Re: [VOTE] Enumerations
| From: | Ben Ramsey | Date: | Wed, 17 Feb 2021 18:10:53 +0000 |
| Subject: | Re: [VOTE] Enumerations | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-113198@lists.php.net to get a copy of this message | ||
> On Feb 17, 2021, at 12:08, Rowan Tommins <rowan.collins@gmail.com> wrote:
>
> On 17/02/2021 17:51, Ben Ramsey wrote:
>>> 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.
>
>
> 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.
Sorry. When I read “were to not pass,” my brain missed the “not” part. :-)
Cheers,
Ben
Attachment: [application/pgp-signature] Message signed with OpenPGP signature.asc
Attachment: [application/pgp-signature] Message signed with OpenPGP signature.asc