4 ms·
Scala was a nicer Java but now Java is nicer
by ape4 2y ago
Scala was a nicer Java but now Java is nicer
- beastman82 2y agoThis is just objectively false. The type system is weaker, the syntax more verbose. No good functional programming libraries in Java. Pattern matching, syntax sugar. The list goes on. I had to go back to Java from Scala and it's very much behind.
- kitd 2y agoSyntax is only part of the equation. And comparing syntaxes is never "objective".
- pron 2y agoJava does have pattern matching, but while some programmers certainly like having more features and a stronger type system to be, there's clearly nothing objective about that preference, considering that the only languages that are as popular as Java or more these days are JavaScript and Python. Of course, no one argues that more popular necessarily means better, but since software has huge economic value (and the vast majority of software is done to further economic activity) you'd expect some correlation between "better" and "more value". Given that for decades now the market consistently prefers the languages that you consider "worse", then one of two things: either there's a huge market inefficiency that somehow no one manages to exploit, or that what you consider better is not, in fact, objective. In short, there's no doubt different programmers have different preferences on what they consider better (though those preferences are clearly not distributed evenly), but if you want to claim that something is objectively better, it has to be better by some objective measure that is related to the actual value that people expect to gain from software. The bigger the gap between your characterisation and market behaviour, the harder it would be to support claims of objectivity.
- usrusr 2y agoScala may have started out as a "nicer Java" back when Java was in its fossilized stage, but the niche it has grown into is more like a Haskell for the JVM. A pretty cool niche, but niche. "Nicer" just isn't part of its claim anymore, hasn't been for quite some time. Kotlin can certainly be seen as a what Scala could have been if had stayed on the "nicer Java" course, and no, Java isn't anywhere close to overtaking Kotlin in the field of unambitous but spectacularly effective niceties. Because that's what Kotlin is, from a Scala perspective: low hanging fruit language features, not powerful enough to even bother. But the Kotlin standpoint is that more powerful isn't necessarily a good thing, they judge a feature on how it improves mundane code, without changing the entire programming paradigm. Scala has long stopped trying to be a "nicer Java", they have chosen a different path. And that's not a bad thing, it just isn't for everybody.