Closed jordanobodh closed 6 years ago
Why case classes are not final by default in Scala?
There are certain instances in which you want to override the methods of a case class.
Very rare. And it's not worth it. They should have been final.
If anybody wants to add the rule, I'll merge it.
I'll submit the PR.
As extending a
case class
would lead to unexpected behaviour, a rule should be added that case classes should be final. Why case classes should be final