Re: [RFC] [Discussion] Add get_declared_enums() function
| From: | Alexandru Pătrănescu | Date: | Wed, 02 Oct 2024 19:10:13 +0000 |
| Subject: | Re: [RFC] [Discussion] Add get_declared_enums() function | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-125733@lists.php.net to get a copy of this message | ||
On Wed, Oct 2, 2024, 21:32 Larry Garfield <larry@garfieldtech.com> wrote:
> On Wed, Oct 2, 2024, at 7:27 AM, Alexandru Pătrănescu wrote:
>
> > If we remove the limitations, should we reclassify at that point enums
> > as classes?
>
> Enums already are classes. I don't know what reclassification you're
> talking about. The RFC is about adding a "get me a list of only those
> classes that are enums" function to PHP. Changing how Enums behave or are
> implemented is wildly out of scope.
>
>
>
Sorry if my reply wasn't clear enough and somehow ambiguous.
I agree. Enums are classes. And my reply was just a way to explain this
view in a friendly manner.
Maybe reading previous replies in the thread could be more clear on my
stance.
Comming back to the RFC, I think it needs to be changed as I believe it
focuses too much on internals, ignoring userland view.
Just adding the new function should be enough.
-- Alex