5 ms·
I don't really have anything to say about your other points, but the only comparable compile-to-JS tech in your list to ClojureScript is Scala.js. The other opt
by swannodette 9y ago
I don't really have anything to say about your other points, but the only comparable compile-to-JS tech in your list to ClojureScript is Scala.js. The other options assume you don't see significant value in using the same programming idioms across client and server.
- dragonwriter 9y agoWhile not on the list above, there are certainly others like Opal (Ruby in js)
- nurettin 9y agoI've used Opal for client-side validation of a server-side game's rules. (player makes a move on the client, game rules are played out, just the move is sent to server and server plays the same move again using the same game class) That said, it wasn't a breeze to work with. The compiled object's properties were hard to access. I actually had to serialize it to json
- deleted 9y ago[deleted]
- virtualwhys 9y agoThe point is that most server languages these days compile to javascript. OCaml has Bucklescript, Haskell has GHCJS, Kotlin and Rust compile to JS, etc. Clojurescript and Scala.js are probably the most mature, but getting developers to make the switch when their server language is not Clojure or Scala is an uphill battle. Case in point: I find Bucklescript to be absolutely amazing (generated binaries on par with size of hand written JS) but Scala.js is a better fit since I've been writing Scala for 6 years.
- swannodette 9y agoThat's exactly what I'm saying. You don't choose ClojureScript or Scala.js haphazardly, you're already using Clojure or Scala. Thus it doesn't make sense to lump them into choices that are primarily client-centric like Elm or PureScript.
- amelius 9y agoAlso, WASM is just around the corner, which will probably make this a non issue.
- jbeja 9y agoThere is no value indeed. Why would you the same languages for a domain it doesn't fit?
- lilactown 9y agoAs someone who chose ClojureScript over many of the other compile-to-JS languages without using Clojure on the server, I disagree. Especially if ClojureScript could become more attractive than (or at least have a real solid standing amongst) Elm/PureScript/etc., I could see that being a big boon to Clojure development as well.
- spiralganglion 9y agoWith CLJS on Node booting up as fast as it does, I can envision a world where CLJS is vastly more popular than CLJ, since it's able to deliver a class of experience prohibited by the slow JVM startup. All the other common criticisms are shared by both CLJ and CLJS, so there's a chance that, eventually, CLJ only has the startup time as a knock against it, and CLJS has no such shortcomings. (Ignoring, of course, "Lisp is weird".. don't get me started.) That all said, I think all 'piles-to-JS language bets are off in the face of WASM.
- dragandj 9y agoThere are also things that clj has and cljs doesn't have and this is the top-class virtual machine. lots of us really appreciate JVM, and are not impressed at all by node, and especially its ecosystem.
- spiralganglion 9y agoThat just depends on your background. For a bunch of us folks who come from a non-JVM background, we could say the same about Java. Really, Java and JS are the two biggest language communities in the world, with phenomenal feats of engineering in their runtimes, and a whole host of things to complain about. Since CLJ and CLJS are tied in this regard, I still think the startup time is the only differentiable factor in my proposed hypothetical future.
- ledgerdev 9y agoSo nice to hear someone else say this, and I feel the same about CLJS. And yeah WASM is looking pretty promising (threads/gc/efficiency), and a CLJ like language that targets it directly would be so interesting for the very long term future.