News for hackers. Stuff that matters.
Re:An Object-Oriented Language for the '20s by dominikbucher on Sunday March 14, 2021 @07:43AM (#26454540)
Can't speak for all languages and usecases, but at least in Scala its primary use (afaik) is to enable the compiler to reason about the correctness of an application (i.e., it knows all the possible subclasses of a class and can tell you if you forgot to handle some case). I think this is also useful in other languages if you have some logic somewhere that depends on knowing all possible subclasses of a class (independent of the compiler generating warnings or not).

There are no comments on this comment yet.