Re: [PHP-DEV] [low priority] WeakMaps with scalar keys

2024-07-11 Thread Rob Landers
On Thu, Jul 11, 2024, at 08:45, Rob Landers wrote: > > > On Thu, Jul 11, 2024, at 01:11, Benjamin Morel wrote: >>> The answer is: it depends. If you don’t need the array to clean up after >>> itself, you can indeed use an array of WeakReference to get most of the way >>> there. If you want it t

Re: [PHP-DEV] [low priority] WeakMaps with scalar keys

2024-07-10 Thread Rob Landers
On Thu, Jul 11, 2024, at 01:11, Benjamin Morel wrote: >> The answer is: it depends. If you don’t need the array to clean up after >> itself, you can indeed use an array of WeakReference to get most of the way >> there. If you want it to clean up after an object gets removed, you either >> need

Re: [PHP-DEV] [low priority] WeakMaps with scalar keys

2024-07-10 Thread Benjamin Morel
> > The answer is: it depends. If you don’t need the array to clean up after > itself, you can indeed use an array of WeakReference to get most of the way > there. If you want it to clean up after an object gets removed, you either > need to add support to the stored object’s destructor (which isn’

Re: [PHP-DEV] [low priority] WeakMaps with scalar keys

2024-07-10 Thread Rob Landers
On Wed, Jul 10, 2024, at 19:48, Gina P. Banyard wrote: > On Wednesday, 10 July 2024 at 18:34, Rob Landers wrote: >> Hello internals, >> >> I know now that some of you are swamped getting ready for 8.4, so I want to >> be clear that this will be an 8.5+ thing. I am simply sending it to the list

Re: [PHP-DEV] [low priority] WeakMaps with scalar keys

2024-07-10 Thread Gina P. Banyard
On Wednesday, 10 July 2024 at 18:34, Rob Landers wrote: > Hello internals, > > I know now that some of you are swamped getting ready for 8.4, so I want to > be clear that this will be an 8.5+ thing. I am simply sending it to the list > in case anyone wants to discuss it, burn it with fire, give

[PHP-DEV] [low priority] WeakMaps with scalar keys

2024-07-10 Thread Rob Landers
Hello internals, I know now that some of you are swamped getting ready for 8.4, so I want to be clear that this will be an 8.5+ thing. I am simply sending it to the list in case anyone wants to discuss it, burn it with fire, give it a gold star, or ignore until later. Currently, a WeakMap may