Re: [RFC] Add WeakMap
| From: | Benjamin Morel | Date: | Tue, 05 Nov 2019 12:32:32 +0000 |
| Subject: | Re: [RFC] Add WeakMap | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-107765@lists.php.net to get a copy of this message | ||
Hi Nikita,
After reading the RFC, I have no comments to make, but I just want to thank
you for working on this. I regretted a lot that this wasn't implemented
together with WeakReference in PHP 7.4 <https://externals.io/message/106373>,
as the use cases for WeakReference vs WeakMap are really narrow.
Cheers,
Benjamin
On Tue, 5 Nov 2019 at 10:24, Nikita Popov <nikita.ppv@gmail.com> wrote:
> Hi internals,
>
> This is a follow up to the addition of WeakReference in PHP 7.4.
> WeakReference is an important primitive, but what people usually really
> need are weak maps, which can't be implemented on top of WeakReference (at
> least, not as exposed in PHP).
>
> This RFC proposes to add a native WeakMap type for PHP 8:
> https://wiki.php.net/rfc/weak_maps
>
> Regards,
> Nikita
>