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

Implementing define in a way that allowed it to be used was one of Scheme's innovations relative to some of the other Lisps in the 1970's. It's idiomatic in part because it is easier for new programmers to read and Scheme historically and SICP perpetually are targeted at newer programmers.

Clojure most definitely is not. It's not an accident that Clojure's fn is only two characters. It's design as a language encourages anonymous functions. Along with recur there are many fewer cases where the simpler ways to do something require a name.

The fundamental problem of trying to port SICP to other languages is that SICP is not a book about programming in Scheme. It's a book about software engineering, and the points about software engineering are made in ways that can be readily illustrated in Scheme. Cons is used to illustrate engineering ideas, and while those ideas could be illustrated in Clojure, there's an impedance mismatch between cons and the roughly analogous constructs in Clojure. Part of the baby gets thrown out with the bathwater for little advantage...understanding Scheme probably makes someone a better Clojure programmer, while the force fit of SICP into Clojure probably won't.



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

Search: