Am 27.04.2021 um 19:19 schrieb Pierre <pierre-...@processus.org>:
> I think that the debate "but if your seal your classes I won't be to extend 
> it" is overrated: it's not the language to chose whether or not the 
> library/software author can seal its classes or not, it's up the 
> library/software author to do its own choice. And in that regard, having 
> "sealed" classes in the language is actually bringing that possibility to the 
> library author, so it's more liberty.


The same - "it is more liberty" - could be said about operator overloading, 
multiple inheritance and many other language features which lead to people 
using them in ways / places I consider harmful. So I'd rather not have them in 
my language of choice.

I'm not saying the feature is completely useless in the right hands but I think 
it will be misunderstood and promotes bad habits. Think people abusing 
exceptions for flow control.

But then again maybe I'm just traumatized by people putting final all over the 
place in Java back in the days. I'm sure people in 2021 know better than that 
/s ;-)

- Chris

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

Reply via email to