7 ms·
I want to see a clojure clone embedded as a Go scripting language. The immutability means that the interpreter would be mostly threadsafe, and thus would suppor
by andrewchambers 12y ago
I want to see a clojure clone embedded as a Go scripting language. The immutability means that the interpreter would be mostly threadsafe, and thus would support goroutines well.
- lmm 12y agoEmbedding an immutable language in a mutable one is a recipe for awkwardness - how would you expose host-language things to the inner language? Better to do it the other way around - mutable scripting language embedded inside immutable host.
- tsmarsh 12y agoClojure is an immutable language built on top of mutable hosts. Interop is handled beautifully. A go hosted Clojure (gojure?) would probably be fine.
- lmm 12y agoCalling Clojure from Java is not remotely what I would call beautiful; it's a lot of Strings and pain (especially when you compare to calling Scala from Java). Calling Java from Clojure is substantially more elegant (it requires a structured FFI but Clojure is good at those).
- andrewchambers 12y agoI don't know if it would be an exact clojure clone, would need a few tweaks and the addition of native channels.
- nsjph 12y agoWell the closest I've found is https://github.com/zhemao/glisp https://github.com/zhemao/glisp which is similar syntactically, but doesn't have immutability.
- andrewchambers 12y agootto + clojurescript would probably work, but would lack many features + thread safety.