Comment by kbp
8 years ago
> > When Rich Hickey invented Clojure, he kept the gems of the LISP tradition, but jettison much of the muck. This is why Clojure has first instead of car and rest instead of cdr
> Rich Hickey did not invent 'first' and 'rest'.
Rather than the names 'car' and 'cdr', the "muck" that Rich Hickey jettisoned here was conses as a core language feature. Since Lisp already used first and rest for operating on lists, Clojure borrowed those names, and since Clojure doesn't have conses (in the Lisp sense of the term; Clojure has a cons function, but it just adds elements to sequences rather than constructing pairs), it didn't have any need for car and cdr, which operate on conses.
It reminds me of a section from Kent Pitman's article 'More Than Words, or: Lambda, the Ultimate Political Party':
> Some years ago, when I was first becoming involved with language standards, I did a personal study of languages in the Lisp family to determine whether there was a common core of operators that were present throughout the family with the same name and semantics.
Then after going through several basic operators which differ in behaviour or name across dialects, he concludes:
> I did find that CONS was present in every Lisp I looked at with pretty much the same meaning, but that seemed to be an isolated case
No comments yet
Contribute on Hacker News ↗