In terms of whether classes should be final or not by default, this is a much debated point for which there is really no “right” answer. Java decided to do this one way, C # the other, different people think that different languages are right and wrong.
Personally, I like how classes expand by default if people want to make them final, and then they can, this is just a keyword. But allowing a subclass simply adds more flexibility in my view, of course, I don’t need to expand every non-final object under the sun, but if I want to add some degree of specific behavior, then this option is there for me. Yes, a composition can be used (and indeed should be used in some cases), but this does not exclude and should not exclude a subclass as an option. There are many cases where a subclassified object fulfills an is-a relationship with a parent, in which case this is the right way. Of course, although this has been misused in the past, even in the Java API (properties, for example, are not really a hash table.) But if you try to change the language so that people stop being stupid, they will always find a way around it!
As for making the class package private, for me this option would be much more useful if the packages were hierarchical rather than flat. Yes, they are hierarchical in description, but something declared by the private package in org.me cannot be obtained from org.me.subpackage, which I often feel the need to do. Fortunately, with the addition of superpackages, we can better use this option!
source share