Hacker News new | past | comments | ask | show | jobs | submit login

Trait params have little to do with OOP.

Opaque types are not a "small OOP improvement", they finally bring zero-cost newtypes to Scala, superseding value classes. Now you can finally ensure that object Ids, people's names, meters, feet, and degrees Celsius all have different types - without any extra boxing at runtime.

Your list is also missing typeclass derivation, which is going to be a fantastic quality of life improvement. Yes, even for people who don't care about what a typeclass is.

This is a point I want to stress the most, I think. Features like type lambdas, or libraries like Shapeless - they can possibly be extremely beneficial to you even if you don't use them directly in your code. Ask your nearby Haskell programmers about the virtues of `deriving (Eq, Ord)` and they'll talk your ear off. And that's before they even get to things like `deriving (FromJSON, ToJSON)`. Don't have a Haskell programmer nearby? It's ok, ask a Rust programmer about Serde instead. Typeclass derivation is just such a massive, massive feature to have in your language's repertoire.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: