3 ms·
"I'd been happy to have Java with closures, first class functions, and maybe better generics." But that would have made Scala just about equivalent to modern C
by Dn_Ab 16y ago
"I'd been happy to have Java with closures, first class functions, and maybe better generics."
But that would have made Scala just about equivalent to modern C#. That is, a language balanced for the current masses but still with some modern features. This is not Scala.
Scala is amongst those languages that are blazing the paths for the future masses. There is a friendly subset but it is meant for those that are not afraid to play with the experimental at the expense of the farmiliar. Basically Language hobbyist and startups with no legacy code base. It is not hard, I know this because I taught someone with no experience whatsoever in programming and they found it easier than Java. Someday it will be considered clunky and mundane but that day is not today.
But my complaints on Scala could not have been put better than ominus_prime, too many way to do simple things. Another complaint is how well it interacts with the Java ecosystem - Ive noticed C#/F# is a loot smoother than Java/Scala. Simple Enums in Scala are also something that is too hard (for say if you need to interact with java or just dont need full blown algebraic types). Things are a lot better in this regard since 2.8 but still not there IMO.
- fizx 16y agoEnums are awful in Scala. I usually just use this pattern: abstract case class MyEnum(id: Int) object MyEnum { object Foo extends MyEnum(0) object Bar extends MyEnum(1) object Baz extends MyEnum(2) }