4 ms·
It's got some differences, notably a vector type with square [] brackets that is differentiated from homoiconic function calls in normal (), and also some hacky
by jbooth 13y ago
It's got some differences, notably a vector type with square [] brackets that is differentiated from homoiconic function calls in normal (), and also some hacky stuff with (recur) that they had to do to deal with the JVM's lack of tail call optimization.
- j_jochem 13y agoIsn't [...] just syntactic sugar for (vector ...)? The point about tail call optimization is interesting though. I wonder what it would take to implement that on a JVM.
- jbooth 13y agoI'm not enough of an expert on Clojure or Lisp to answer (my lisp knowledge is extrapolated from scheme in college). I believe that Rich Hickey said that having special notation for vectors (and for maps, I remember now) was about, basically, yes, that syntactic sugar. He was specifically comparing to lists in () which are somewhat indistinguishable from function calls in (), hence an example of overloaded parentheses.