Re:React Server Side Rendering with GraalVM for Clojure
by fulafel on Monday July 08, 2019 @11:03AM
(#20383319)
Few languages can run the same code on both JS and JVM. Of those Clojure is probably the most production-quality.
Re:React Server Side Rendering with GraalVM for Clojure
by iLemming on Monday July 08, 2019 @06:29PM
(#20387355)
That is very true. Even spending years writing nodejs projects I have never felt what truly "code-reuse" is about. Even with the same language being on both sides there's a huge difference between front-end and back-end. I was surprised to find out - Clojure lets you do that so elegantly, even though you essentially on two, completely different platforms much of the code can be re-used.
Re:React Server Side Rendering with GraalVM for Clojure
by chrisseaton on Monday July 08, 2019 @11:44AM
(#20383683)
More production quality than JS itself?
Re:React Server Side Rendering with GraalVM for Clojure
by refset on Monday July 08, 2019 @12:40PM
(#20384195)
The sibling response from fulafel is definitely the central argument. I would also add that Clojure has excellent production-quality "interop" with all of its host languages, such that end-to-end ergonomics are relatively painless e.g. CLJS<->JS<->Graal Polyglot<->Java<->Clojure
There was briefly (now deleted) a response to fulafel's comment which essentially pointed out how JavaScript itself should be considered a production-quality language that is up to the task. After all, JavaScript can also now be used to build JVM applications thanks to GraalJS ...except I wouldn't bet on that technology direction gaining much traction at this point in time (unless maybe Oracle has a trick up its sleeve).
Re:React Server Side Rendering with GraalVM for Clojure
by cljs-js-eval on Monday July 08, 2019 @05:56PM
(#20387159)
Clojure has "reader conditionals" which enable you to write a single file and only have divergent code paths when you need to do something that is JVM or JS specific (or CLR-specific, if you're into that).
It's super helpful for shared libraries. A lot of our code can be shared between JVM servers, JS lambdas, or JS frontend code without much development effort. It's mostly just a matter of naming a file .cljc and you're off to the races.
Why? Aren't there a lot of other languages that do the same? What is different about Clojure? Genuinely interested!