Re: [IDEA] allow extending enum
| From: | Tim Düsterhus | Date: | Wed, 29 Mar 2023 16:05:16 +0000 |
| Subject: | Re: [IDEA] allow extending enum | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-119778@lists.php.net to get a copy of this message | ||
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 aRequiring folks to add 'final' to their existing enums for them to behave as expected would be considered a breaking change. Best regards Tim Düsterhusfinalstatement to the definition ofIntervalBoundary.