Re: [VOTE] Enumerations
| From: | Rowan Tommins | Date: | Wed, 17 Feb 2021 18:08:07 +0000 |
| Subject: | Re: [VOTE] Enumerations | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-113197@lists.php.net to get a copy of this message | ||
On 17/02/2021 17:51, Ben Ramsey wrote:
I think what Chase meant was that if we don't want to allow *all* objects as keys, we could allow *a specific subset*, namely Enum cases. The implementation would be similar, but deliberately limiting the scope might avoid some undesirable edge cases and side effects. Regards, -- Rowan Tommins [IMSoP]On Feb 17, 2021, at 11:48, Chase Peeler <chasepeeler@gmail.com> wrote: 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.Others, please correct me if I’m wrong, but I believe each enum case is already an object.