Seems a lot like another syntactic sugar. Like in Lua, where you can write obj:method(12) instead of obj.method(obj, 12)
But OOP-like syntax on non-object data is still weird. The question about data manipulation behavior (is it a pointer like other objects or is it a scalar like existing array?) is a tough one. 2012/7/18 Andrew Faulds <ajf...@googlemail.com> > OK, ok. Let me clear some things up here. > > We don't want it to make things more object-oriented or whatever. The real > motivation is to give us a chance to make a much cleaner, much nicer array > API without breaking BC. We can keep the legacy array_* and unprefixed > functions, but we can also create "pseudo-object methods" (not objects, but > methods and possibly properties hooked into the method call processing, > checking for non-object types - it's very easy to check (I've done it) for > non-objects, and implementing this seems simple enough but I don't know the > Zend engine well enough). This way we can have array->key, > array->sort(TYPE), etc. for new code to use, instead of the legacy array > and string method mess (the latter needs a cleanup more in particular). > > OK? > On Jul 18, 2012 10:14 AM, "Pierre Joye" <pierre....@gmail.com> wrote: > > > hi, > > > > On Wed, Jul 18, 2012 at 10:13 AM, Stas Malyshev <smalys...@sugarcrm.com> > > wrote: > > > > > And no, it does not "allow us to clean our APIs" - I again point out > > > using -> has nothing to do with cleaning APIs. Repeating "clean APIs" > > > as if it is some magic spell will not make false statement true, and > the > > > statement that using -> somehow cleans up APIs is false. Cleaning APIs > > > and pseudo-objects are two completely different things, and nobody yet > > > shown any relationship between the two. > > > > You do not see it, your call. But it indeed does and anyone I was > > talking to about this topic agrees with this view but two persons (you > > incl.). > > > > Anyway, it is somehow pointless to argue to death about that as it is > > technically not possible yet. I'm 200% sure it will happen. > > > > Cheers, > > -- > > Pierre > > > > @pierrejoye | http://blog.thepimp.net | http://www.libgd.org > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > >