Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Looks like Java is slowly but surely catching up to Scala in terms of API, syntactic sugar etc. I wonder if some people disliking Scala compiler slowness would consider the switch back to Java.


Far from it. When Java gets pattern matching, Scala will have moved to version 3.0 with trait parameters, union and intersection types, implicit functions, type lambdas, cleaner macros and many more.

Also, Scala compiler slowness is virtually not a problem any more since introduction of Zinc 1.0. During development, I get repeatedly compile times around 2-5 seconds on Scala 2.11, and recent Scala 2.12.x / 2.13.x showed to be typically 30%-100% faster than 2.11.x.


I only played with Scala but never found a good business reason to actually use it.

Personally I rather not be in the bleeding edge and not having to deal with interop issues, or missing tooling.


The whole point of Scala are its advanced features like implicits, higher kinds and macros, and not just syntactic sugar like in Kotlin. Therefore you won't appreciate Scala by just shortly playing with it.

Also in 2018 interop issues or missing tooling problems are long gone.


I am well aware of those features.

Only Scala shops can make effective use of them, and I am yet to do a project where Scala libraries were even considered.


Maybe in 15 years Java will finally get pattern matching, but it's never getting higher kinded types.


The first step towards pattern matching will be previewed in JDK 12[1], as a Kotlin-like switch statement, to form the basis of pattern matching[2] together with changes already in JDK 11[3]. I think it will be more like 15 months than 15 years.

I don’t expect higher kinded types any time soon, though.

[1]: http://openjdk.java.net/jeps/325 [2]: http://openjdk.java.net/jeps/305 [3]: http://openjdk.java.net/jeps/309


If it doesn't have what 305 calls "deconstruction patterns" and "nested patterns", it's not really pattern matching. I'll be impressed if those make it in within 15 months.




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

Search: