Hi, On Mon, Jul 18, 2011 at 20:12, Adam Harvey <ahar...@php.net> wrote: > On Jul 18, 2011 9:20 AM, "Hannes Landeholm" <landeh...@gmail.com> wrote: >> In a nutshell: The RFC proposes adding a single class called "SplWeakRef" >> which provides the "Weak Reference" feature. This is the only change. > > This may just be Monday morning fuzziness, or I've just missed something in > the RFC, but is there a reason weak references would be limited solely to > objects, rather than any variable that can be dealt with by-reference?
Other kinds of variables does not allow us to define specific hooks like for objects. Implementing weak references (note that in this context reference != php reference, but object reference) for other types would require considerable changes to the engine, which we are trying to avoid here. In this case, for objects, the implementation remains quite simple, because objects allow such introspection already. Last but not least, it also makes little sense to do so from a design perspective, as other types do not provide the handle indirection that objects do. > > Thanks, > > Adam -- Etienne Kneuss http://www.colder.ch -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php