Re:Try Clojure
by phendrenad2 on Wednesday May 22, 2024 @03:47PM
(#40445478)
Is there a version of Clojure that compiles to LLVM or something? Sort of like what Scala-native was supposed to be (but never materialized). I like functional programming but I can't abide the Java ecosystem in 2024, it's just too archaic for my taste.
[ Parent
| on HN ]
the top comment as of writing this reply points to https://babashka.org/, but it's GraalVM instead of LLVM (which shouldn't really bother you)
Babashka scripts are interpreted, the babashka binary itself is compiled with GraalVM.
But: you can also build regular Clojure programs using GraalVM and create a fast-starting binary.
Soon there will be! https://jank-lang.org
Re:Try Clojure
by lgrapenthin on Wednesday May 22, 2024 @05:41PM
(#40446975)
Do they have a realistic shot at implementing immutable datastructures?
Oh for sure. That's not the tough part. :)
jank uses immer for that: https://github.com/arximboldi/immer
There's an ongoing effort to create a Clang/LLVM implementation of Clojure's runtime with hot reloading and other very interesting features. You can take a look at it at https://jank-lang.org/. It still hasn't reached feature parity with full blown JVM Clojure but we've paying close attention to its development.