5 ms·
I like the storm of Scala.js comments on the article. It's definitely game-changing for the Scala ecosystem. You can run Scala on node.js now, and by extension
by raquo 11y ago
I like the storm of Scala.js comments on the article. It's definitely game-changing for the Scala ecosystem. You can run Scala on node.js now, and by extension you can package desktop apps written 100% in Scala.js using Electron.
I'm just starting to fiddle with it, but Scala.js on both the backend and frontend seems like a great combination – lets you use the same language and packages throughout your application, and frees you from the JVM.
- galistoca 11y agoWow that's a lot of code delegacy there: scala => scala.js => node.js => electron => desktop.
- raquo 11y agoBuilding cross-platform apps with the same codebase is gonna be ugly one way or another. This particular method is interesting to me personally because I'd rather depend on node.js than Oracle's JVM. It's worth mentioning that Scala might get a native backend soon, partly built on the same infrastructure as Scala.js – that could give you a migration path from node.js/Electron to a truly native app with a simple WebView for UI. See https://www.reddit.com/r/scala/comments/4ftcx4/scala_native_coming_soon/ https://www.reddit.com/r/scala/comments/4ftcx4/scala_native_...
- dk8996 11y agoI am not sure what makes you trust node.js (V8) more than the JVM. The JVM has been in solid for a long time, has higher performance, and more stable. The JVM GC is very good and highly-tunable.
- raquo 10y agoEither of those technologies is good enough technically for my purposes. However, I have much more confidence in node's new governance (and therefore its bright future) than in Oracle. Oracle essentially has a monopoly on Java. And they're not nice guys. I don't feel comfortable building a cross platform application on Java no matter how much momentum it has gained historically.
- dk8996 10y agoThe Java ecosystem is fairly complex and it's hard to understand. Your statement of "Oracle essentially has a monopoly on Java" is not true, considering Java language is used to built Android apps, runs on diff VM and uses different bytecode -- outside the control of Oracle (about 2M andorid apps and 1.6B phone sold). Another thing to consider, the JVM is an open spec and most of it is open sourced, see OpenJDK. There is also many implementations of the JVM, see; https://en.wikipedia.org/wiki/List_of_Java_virtual_machines https://en.wikipedia.org/wiki/List_of_Java_virtual_machines
- raquo 10y agoIndeed, I don't have a good understanding of the JVM ecosystem. However: Google is tentatively on the hook for $9B for... essentially implementing its own JVM... or something. Doesn't matter to me, end result is that the future of Java on Android is far from clear. They're allegedly looking into using Swift as the next generation Android language. RoboVM, one of the better / more popular ways to write iOS apps in Java was close-sourced, then acquired by Xamarin, then Microsoft, then shut down. Oracle charges licensing fees for using JVM in embedded devices and kiosks. To summarize, there's an incredible amount of tools and libraries for Java, but I don't like where Java's mobile story is going in general. As far as I know the number of viable JVM machines you could build a business on is maybe... 5 at most? They're all experimental and/or abandoned. Meanwhile, node / JS / ASM.js / Emscripten and friends are only getting better, faster and more widespread outside of the web.
- rubyn00bie 11y agoOr... you could just use stuff already built into the JVM. I'd much rather escape from JavaScript (or node) than the JVM... http://www.scalafx.org/ http://www.scalafx.org/
- raquo 11y agoThe reason I'm going with Scala.JS is to have UI code shared by web, mobile and desktop platforms. ScalaFX needs JVM for UI code, so it can only run on desktop and possibly Android.