Re: ::from() and tryFrom() on Basic Enums
| From: | Deleu | Date: | Thu, 10 Jul 2025 00:52:17 +0000 |
| Subject: | Re: ::from() and tryFrom() on Basic Enums | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-127983@lists.php.net to get a copy of this message | ||
On Wed, Jul 9, 2025 at 7:23 PM Rowan Tommins [IMSoP] <imsop.php@rwec.co.uk>
wrote:
> On 09/07/2025 17:39, Deleu wrote:
> > It's currently undeniable that a Unit Enum name is a string.
>
> If you want to associate a single string value with each enum case, use
> a string-backed enum, and propose some short-hand syntax. Please leave
> unit enums as opaque objects for those of us who see value in that.
>
>
That's exactly what I'm doing :shrug:
--
Marco Deleu