3 ms·
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 ecosy
by ebruchez 6y ago
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.
- einpoklum 6y agoThat 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?
- lihaoyi 6y agoIn 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
- ebruchez 6y agoI 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.