7 ms·
Java is improving, but it's got a long, long way to go before it can catch Scala. Can you write data types in Java 9 as simply as case classes? Does type infere
by lmm 12y ago
Java is improving, but it's got a long, long way to go before it can catch Scala. Can you write data types in Java 9 as simply as case classes? Does type inference just work? Is there something as concise as pattern matching? Does it have typeclasses, or an equivalent solution to the expression problem? Can you write DSLs with the flexibility of Scala's for syntax? Can you write tagged types? Even if it has all these features, does it have them in a unified way, implemented by consistently combining some simple primitives, or is it a mess of special cases?
- zak_mc_kracken 12y agoConsidering that Java still has about 95% market share on the JVM, I'd say Scala has a long way to go before it can catch up to Java. Same observation for jobs and tooling. It really all depends on what criterion you use.
- lmm 12y agoThe grandparent asked explicitly about Java 8 and 9. What are the market share, jobs and tooling like for those versions? As someone who's had to push for both, many organizations find introducing Scala easier than doing a JVM upgrade (since the latter requires work on the ops side). Last time I looked, e.g. the New Relic agent would crash if you tried to run it under Java 8 - whereas it will profile your Play transactions just fine. Popularity is a lagging indicator. The tooling is there already, quite frankly - we see first-class support for Scala in new efforts like Takipi. Jobs are what you make them - more than once I've taken a Java job and turned it into a Scala job. I honestly believe it's the best general-purpose language going right now (which is why I use it, and why I have a job doing it full-time).