4 ms·
It blew my mind when I first realized that in Clojure projects the programming language is a dependency of the project itself. Of course, there is still the JVM
by phyrex 9y ago
It blew my mind when I first realized that in Clojure projects the programming language is a dependency of the project itself. Of course, there is still the JVM, but I personally have never run into JVM version problems.
- coldtea 9y ago>Clojure projects the programming language is a dependency of the project itself. That's no different than any other interpreted language...
- bpicolo 9y agoIt's somewhat distinct from other languages because Clojure is actually just a java library - it's not a standalone concept/runtime/whatever. https://mvnrepository.com/artifact/org.clojure/clojure https://mvnrepository.com/artifact/org.clojure/clojure
- lilactown 9y agoThe difference is one of semantics; of course all interpreted languages depend on their interpreter environment, but for some reason they do not always actually put it inside of their dependency tree a la package.json, requirements.txt, etc. The reason this is so natural for Clojure is that it's a hosted language; the standard library & language itself is decoupled from the runtime platform (JVM). With Clojure, it's actually funny to think that I have projects on my hard drive that use 3-4 different versions of clojure (not even counting various versions of clojurescript!), without any issues. Doing this with, say, Node.js requires a lot of extra ceremony.
- JamesLeonis 9y agoTo add to this, Clojure benefits strongly from being a Lisp. The language syntax itself might change once an ice age, and even then libraries can extend it with macros. Old Clojure code will very likely run with the latest version. Clojure(script) benefits as a compiled language as well. If Clojure 2.0 suddenly discovered Postfix notation was the GREATEST THING EVER, my 1.6, 1.8, and 1.9 projects and JARs are entirely unaffected. They could even run side by side, from the same interpreter version, without so much as a shrug of concern. > (not even counting various versions of clojurescript!) That made me laugh! Clojurescript should use a date stamp as the incremental version.