Hacker News new | ask | show | jobs
by cryptos 1227 days ago
Maybe Rust is close enough to this ideal imaginary Scala-like language. I'm not a Rust expert, but I really like how Rust combines power with a certain minimalism (not in the Go sense, though). There are, for example, no classes with inheritance in Rust, but traits, whereas Scala has traits an all the Java OOP heritage. Another thing is error handling that is handled with return types in Rust, where Scala has also exceptions from the JVM. Same is true for null, what probably shouldn't exist in any modern functional language. Rust doesn't have it while Scala needs it.
1 comments

Rust has no GC and, unlike Scala, doesn't embrace full immutability. This is of course fine, because it focuses on performance, but it means a very different development experience.

Also, Rusts typesystem is lacking many of Scala's features and I don't think it's realistic to add them retrospectively.