Re: [VOTE] Enumerations

From: Date: Wed, 17 Feb 2021 17:48:38 +0000
Subject: Re: [VOTE] Enumerations
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-113195@lists.php.net to get a copy of this message
On Wed, Feb 17, 2021 at 12:41 PM Ben Ramsey <ben@benramsey.com> wrote: > > On Feb 17, 2021, at 09:26, Chase Peeler <chasepeeler@gmail.com> wrote: > > > > On Wed, Feb 17, 2021 at 10:09 AM Rowan Tommins <rowan.collins@gmail.com> > > wrote: > > > >> On 17/02/2021 14:30, Larry Garfield wrote: > >>> The Enum RFC has been approved. > >> > >> > >> Thank you and Ilija so much for putting in the effort to make such a > >> carefully thought-through proposal, and I'm really looking forward to > >> being able to use it. > >> > >> I realise not everyone agrees with the approach, but am hopeful that it > >> can be expanded on in future proposals to add a lot of power to the > >> language. > >> > >> > > Glad to see this passed. I definitely would have voted for it if I had a > > vote. The only thing I wish had been included was the ability to use them > > as array keys, but definitely don't think the lack of that would be a > > reason to vote against it - especially since the possibility is still > open > > in the future and adding it wouldn't cause any BC issues. > > > There’s an RFC for that. ;-) > > https://wiki.php.net/rfc/object_keys_in_arrays > > Cheers, > Ben > > If that were to not pass, though, it seems supporting enum cases as keys would be worth exploring. Fully support allowing all objects as keys though.. -- Chase Peeler chasepeeler@gmail.com

« previous php.internals (#113195) next »