3 ms·
Clojure is really designed around the sequence abstraction, which is list-like but not a list: Clojure’s various concrete datastructures all implement this abst
by fiddlerwoaroof 6y ago
Clojure is really designed around the sequence abstraction, which is list-like but not a list: Clojure’s various concrete datastructures all implement this abstraction and, consequently, much of clojure.core is more generic than the equivalent functions in the CL package: maps present as sequences of pairs; vectors, sets and lazy sequences all present as sequences of items, etc.
- oalae5niMiel7qu 6y agoClojure is oriented towards functional programming, hence no loops, but because it's also a thin abstraction over the JVM, it doesn't provide tail-call elimination, so you can't write traditional functional code the way you would in SML or Scheme. Instead, you have to use the clumsy "recur" construct to work around the JVM's limitations. It's also less consistent than proper Lisps. For example, it's possible to produce a Java OverflowException using Clojure math operators. Some operations will gracefully upgrade to bignums, but others don't.