Hi On 4/5/24 02:20, Saki Takamachi wrote:
In other words, the concerns we are currently aware of are issues of responsibility on the user's side, and my opinion is that there is no need to give that much consideration. However, this is my personal opinion, and there may be more reasonable opinions.
I've already sent a sibling email, explaining why I believe that making the Number class not final is a mistake. However I'd also like to comment on that specific bit of your email:
I strongly believe in misuse-resistant APIs. Users should generally be steered towards making the right choice, even without needing to consult the documentation. For example, by making the "right choice" the easiest choice or by preventing "wrong choices" entirely.
Preventing folks from making wrong choices is overall less costly than them realizing that they made a wrong choice and then being unable to change it, due to backwards compatibility or interoperability concerns.
PHP has enough gotchas as it is, so for any new API making it a *great* API, not just an *okay* API should be part of the consideration. APIs within PHP need to survive for 10+ years.
Best regards Tim Düsterhus