[VOTE] Allow static properties in enums

php.internals

tyson andre

5 years ago
Hi internals, I have opened the vote on https://wiki.php.net/rfc/enum_allow_static_properties Voting ends on June 15, 2021 Previous discussion can be found at https://externals.io/message/114494 Thanks, Tyson

Nikita Popov

5 years ago
On Tue, Jun 1, 2021 at 3:25 PM tyson andre <tysonandre775@hotmail.com> wrote:
> Hi internals, > > I have opened the vote on > https://wiki.php.net/rfc/enum_allow_static_properties > Voting ends on June 15, 2021 > > Previous discussion can be found at https://externals.io/message/114494 > > Thanks, > Tyson >
I'm neutral on this one. Not a fan of static properties, certainly not a fan of static properties on enums, but I do see the argument that the restriction is somewhat arbitrary from a technical perspective. I guess you can view the current baseline here in two ways: 1. Enums don't support properties, and we don't go out of our way to support static properties in particular, or 2. we prohibit static properties even though there is no technical reason to do so. Considered through (1.) the limitation is not arbitrary, just the result of a more general limitation that certainly *is* needed. Regards, Nikita