4 ms·
Clojure variants are incompatible in various basic ways, since they use the host language for various things. The underlying platform also restricts what the im
by lispm 10y ago
Clojure variants are incompatible in various basic ways, since they use the host language for various things. The underlying platform also restricts what the implementation provides. No TCO in JVM -> no TCO in Clojure. Numbers are internally floats in Javascript -> Numbers are internally floats in ClojureScript and use Javascript semantics, not Clojure-Semantics.
Clojure:
Clojure 1.8.0
user=> (/ 3 4)
3/4
ClojureScript
cljs.user=> (/ 3 4)
0.75
Looks like these are different languages...
Common Lisp implementations OTOH implement most of the standard. There is also more choice in implementations:
* native implementations AND hosted implementations
* actual Lisp interpreters or a mix of interpreters and compilers, interactive compilers, batch compiler
* compilers written in Lisp itself with good error messages, forms of compile-time type checking/inference, and advanced error handling (like SBCL, CMUCL)
* compilation to C, full embedding into C programs (ECL and others)
* full embedding in C++ (CLASP)
* compilation to shared libraries, embeddable into other applications
* whole program compilers for delivery of compact applications (like mocl)
The main Clojure compiler is written in Java and it shows...
https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java https://github.com/clojure/clojure/blob/master/src/jvm/cloju...
If one targets a certain host environment (JVM, Javascript, ...) then this range of options and choice might not matter, even hinder - besides getting a poorer version of interactivity.
If we see a Lisp as a language on its own, then it matters a lot.