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

The article mostly lost me with two points:

* It claims to be a compiled language "like C++ and Java" - not making a distinction between targeting multiple hardware platforms and targeting a cozy VM.

* It ties itself strongly to the Java ecosystem.

So, I guess I might consider it in the 'nicer Java' category - and it does seem nicer than Java, subjectively - but not outside of that ecosystem.



It might be worth mentioning that Scala now compiles to 3 different targets:

- JVM

- JavaScript (Scala.js)

- native (Scala Native)

The tie to the Java ecosystem has significantly loosened over the last few years.


That is interesting... but it's also the opposite message from the article. It even emphasizes again how Scala "leans heavily" on the JVM:

> The last thing that Scala does well is to lean heavily on the host language for both its language semantics as well as its implementation. Scala is typically run on the JVM, which together with the Java ecosystem provides a host of useful things that Scala doesn't need to worry about: etc. etc.

So, what do you do with Scala when you don't use the JVM at all, nor any Java libraries?


In Scala.js, you lean heavily on the Javascript runtime, and on the large ecosystem of Javascript libraries. That integration into the existing ecosystem is in fact one of the big selling points of Scala.js, just like how it is a big selling point of Scala-JVM

Scala has multiple host languages, and it leans heavily on each of then whenever used on that platform


I should add to lihaoyi's reply that in addition to the target environment's libraries, many Scala libraries cross-compile for Scala JVM, Scala.js, and (to a lesser extent due to its relative novelty) Scala Native.

For example I am now cross-compiling JVM/JS a fairly large project which uses, directly or indirectly, Circe, Cats, ScalaTest, Enumeratum, Shapeless, and Parboiled2, and all of that works flawlessly.




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

Search: