Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I am often wishing I knew of an easier way to compare Lisps. I haven't used any dialect enough to fully grasp the subtleties. For example, the differences between Racket and Clojure.


Probably the main difference between Clojure and all the rest, from a purely lispy perspective, is that it's not list-oriented. Maps are its preferred data structure. I'm not even sure it has cons cells - at the very least, I've never seen them being used.

Probably the main thing that distinguishes Racket is that it's meant to be a playground for experimenting with programming language design.


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.


Clojure 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: