3 ms·
The question is one of numbers. How many Scala developers use it as a better Java, and how many use it for its "richer set of features". The first group would l
by pron 13y ago
The question is one of numbers. How many Scala developers use it as a better Java, and how many use it for its "richer set of features". The first group would likely benefit more from Kotlin (as those other features are, IMO, Scala's Achilles heel), and if that group is the larger one (and I suspect it most certainly is), then Kotlin is in direct competition with Scala.
As to "bringing nothing new to the table at all", I'm not sure about that. It depends on your definition of "nothing" and "something". I think they certainly bring convenience, and their[1] switching costs are orders of magnitude lower compared with Scala's. The question is, then, is the "something new" Scala brings worth the price. Again, the answer to that depends on the user. Some will think it most certainly is; others will find the cost way too high.
[1]: Well, Kotlin's; not Ceylon's
- lmm 13y ago> their switching costs are orders of magnitude lower compared with Scala's. How so? Scala may have more ways for features to interact and I guess a larger library ecosystem to become aware of (though it seems perverse to count a large library ecosystem as a downside), but IME most of the cost of switching is in tooling support and finding a developer community to answer questions - both areas where Scala is far ahead of something like Kotlin.
- pron 13y agoBecause if you have a Java project, it's trivial to write a few classes in Kotlin. It feels perfectly natural to have a mixed Java/Kotlin package. Integration is seamless. Scala/Java integration, OTOH, is a pain, especially if you want it to feel natural in both languages, or even only in Scala. Even Clojure/Java integration is easier than Scala/Java integration.
- DCKing 13y agoClojure has beautiful Java interopability for a Lisp, and Java really does break down idiomatic Scala a lot. But that last sentence is way too hyperbolic.
- DCKing 13y agoIt's maybe even wrong of me to lump Ceylon and Kotlin together. Kotlin definitely is richer (and closer to Scala in features) and can also compile to JavaScript, which puts it in a different boat. As a straight and immediate Java replacement, I'd definitely recommend Kotlin as well. If you want to switch over existing Spring apps, you will not get the best out of Scala. Scala, in my experience, is most effective when written without Java goggles on. But Scala definitely has large advantages for new projects or broad refactorings.
- lmm 13y agoCeylon also targets compile-to-javascript. (I thought Kotlin kept the standard Java library - have they compiled a version of that for javascript or what?)
- pron 13y agoI'm not sure about Kotlin's plans re Javascript standard libraries, but I guess the approach is similar to Clojure, i.e. being a "hosted language" aimed at easy integration with the host environment (plus a very basic "common" standard library).
- lmm 13y agoIf anything that makes it less reliable for compile-to-javascript than Ceylon, no? (AIUI Ceylon abandons the Java standard library in favour of its own, partly so that you have the same standard library for either target).