Hi

On 3/29/23 13:01, Rokas Šleinius wrote:
There's a hypothetical (based on a similar real world problem that I
am facing) example for the use of extending enums in the OP.

And I don't suppose Tim was arguing for not allowing enum
extendability, but rather contributing a real world example where
users who were having some totally legal fun hacking around with
internal PHP code would break said internal PHP code.

I'm seeing that you already thought about the topic more based on the other responses. But for the record: I *was* arguing for not allowing enum extendability.

Which may or may not be a big deal from my uneducated point of view,
just saying :) And all could be prevented just by adding a `final`
statement to the definition of `IntervalBoundary`.


Requiring folks to add 'final' to their existing enums for them to behave as expected would be considered a breaking change.

Best regards
Tim Düsterhus

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to