forwarding. On 16 July 2012 02:11, Larry Garfield <la...@garfieldtech.com> wrote: > I think you meant to send that to the list. :-) > > --Larry Garfield > > > On 07/15/2012 08:07 PM, Andrew Faulds wrote: >> >> It would be nice if PHP 6 unified the semantics of >> string/int/float/bool, arrays, and objects. For those first three you >> could use immutable objects, and arrays are just objects implementing >> ArrayAccess etc. >> >> On 16 July 2012 02:05, Larry Garfield <la...@garfieldtech.com> wrote: >>> >>> On 07/13/2012 07:35 PM, Stas Malyshev wrote: >>>> >>>> Hi! >>>> >>>>> So, I've not been inside the engine so in practice this may make no >>>>> sense at all, but what about looking at it the other way around? Vis, >>>>> instead of making objects more and more like arrays, make arrays an >>>>> object that happens to implement ArrayAccess, Iterator, and whatever >>>> >>>> That'd be very nice idea if we were implementing new PHP. I think the >>>> fact that arrays are not objects in PHP is a source of many problems. >>>> However, right now it probably won't be possible to do it without >>>> breaking BC in many places dealing with array copy/assignment/passing >>>> semantics. >>> >>> >>> Hm, valid point. Is there no way that we could setup one object to pass >>> "the old way"? I suppose that would result in just as many special case >>> exceptions... >>> >>> Perhaps that's a change that could be considered for whatever version >>> does >>> get called PHP 6? PHP 5 changed the passing semantics for objects and we >>> survived that, and it was a big boon to the language. Perhaps that could >>> be >>> rolled into bigger changes later? (There's a PHP 6 thread right now I've >>> not >>> looked at yet...) >>> >>> --Larry Garfield >>> >>> >>> -- >>> PHP Internals - PHP Runtime Development Mailing List >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> >> >> > >
-- Andrew Faulds (AJF) http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php