Re: Request for Threads or SRM

From: Date: Sat, 26 Nov 2005 12:36:05 +0000
Subject: Re: Request for Threads or SRM
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.internals 
Request: Send a blank email to internals+get-20524@lists.php.net to get a copy of this message
Hello Marian, that wouldn't buy you anything becasue even if we would allow single overrides we would have to enforce ref or non ref return. marcus Saturday, November 26, 2005, 4:13:03 AM, you wrote: > Maybe magic implementation was a better idea for [] overrieding like > for __get, __set, __isset and __unset stuff. For example __offsetGet, > __offsetSet, __offsetUnset and __offsetExists (or __offsetIsset). This > way people will be free using return by ref or not and also may > implement only some of the methods, e.g. only __offsetGet. > On 25/11/05, Marcus Boerger <helly@php.net> wrote: >> Hello Oliver, >> >> feel free to write an interface that supports return by reference and be >> done. >> >> Having ArrayAccess in use we had to chose one of two possibilities. First >> go with return by reference and second go with return by copy. We chose >> return by copy simply because that was the intended use anyway. That it was >> possible to add return by reference to its signature was an error in the >> first place. Actually one that we mentioned very early. But this is again >> ignorance and maybe not writing every tiny piece of change n some document >> that nobody reads anyway. And oh it is in th NEWS file. >> >> marcus >> >> Friday, November 25, 2005, 8:47:44 PM, you wrote: >> >> > Sara Golemon schrieb: >> >> ArrayAccess interface for the dimension read/write. >> >> > Just to bring the issue up agaian: The current ArrayAccess >> > implementation does not allow for proper simulation of arrays. This has >> > been "broken by fixing" (tm) the method prototypes not to allow >> > "&" >> > anymore in interface implementations where the interface doesn't specify >> > a "&" for the corresponding method and at the same time not changing >> > ArrayAccess to feature a "&" for offsetGet. >> >> =>> You can't do >> >> > $ArrayAccesImplementingObject['virtual offset'][]='test'; >> >> > for offsets that are arrays. >> >> > OLLi >> >> >> >> >> Best regards, >> Marcus >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php Best regards, Marcus

« previous php.internals (#20524) next »