4 ms·
Given their similar concurrency stories, I've felt that the Go VM (is it GVM?) made a better match for Clojure. Of course, Clojure was released before Go so no
by funstuff007 4y ago
Given their similar concurrency stories, I've felt that the Go VM (is it GVM?) made a better match for Clojure. Of course, Clojure was released before Go so not a real possibility at the time.
- jonahbenton 4y agoI thought so too, and worked on this for a while, but Clojure compiles at runtime, while Go does source generation then compiles at build time. I found what was essentially a Clojure-to-Go source transpiler to be surprisingly limited.
- funstuff007 4y agoHow is that any different from Clojurescript, which because the Google Closure build step, does not allow for any run-time macros?
- didibus 4y agoGo doesn't have a VM, it is always pre-compiled to native binaries specific to the target architecture/platform you want to run it on. It also generally speaking doesn't have an intermediate representation that you could target directly, because it does a lot of optimization directly on the GO AST. Though you might be able to have a different language compile to its SSA directly, but it would not be easy at all. The GO runtime also doesn't allow for any dynamic code loading, so you wouldn't be able to have a REPL.
- funstuff007 4y agoYes, strictly speaking you are correct. I guess I consider any language that has built-in GC as effectively a VM (i.e. there's a lot of code being lugged around you don't control).