[wp-hackers] Plugin API: Unique ID explanation
Jacob Santos
wordpress at santosj.name
Sat Aug 8 02:58:50 UTC 2009
While true, the cases where it would not be the same is not used within WordPress.
Jacob Santos
On Sat, 8 Aug 2009 02:57:58 +0200
Jordi Canals <jordi at jcanals.net> wrote:
> PHP5 has less of this problem, because objects are passed by reference by
> default.
>
> That's not exact. in PHP 5 objects are not passed by reference by default.
> It copies the object accessors from original variable to a new one, so both
> variables access the same object.
> http://www.php.net/manual/en/language.oop5.references.php
>
> And normally, in PHP 5 it is recommended not to pass objects by reference.
> As call-time pass-by-reference is deprecated.
>
> --
> Jordi Canals
> http://alkivia.org
> http://jcanals.net
>
>
> > Jacob Santos
> >
> >
> > [1] This is obviously a lie.
> >
> > [2] http://core.trac.wordpress.org/ticket/10487
> >
> > [3] The overall design flaw wasn't that the same object being referenced
> > could no longer be referenced in the future because it would inevitably
> > change, it was that the same object was being used in the first place. The
> > fact that static methods and functions don't have this problem needs to be
> > researched further.
> >
> > [4] Well, it appears that the only reason it worked, was that the algorithm
> > was flawed in such a way that it did was it was intended, but not correctly
> > in such a way that it just hid the bug in a really clever way.
> >
> > [5] Programmers have different levels of competence in different areas of
> > programming. Some people can create solutions like you've never seen, but
> > just really can't do shit about OOP (OOP isn't about putting functions
> > wrapped in a container with global variables with different levels of
> > visibility, well it is, but it is more than that and I hate arguing about
> > that).
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
--
Jacob Santos <wordpress at santosj.name>
More information about the wp-hackers
mailing list