6 ms·
What is the sense in teaching SICP in a language that has no tail optimization? McEval would run straight into the wall.
by kephra 11y ago
What is the sense in teaching SICP in a language that has no tail optimization? McEval would run straight into the wall.
- joonoro 11y agoYou can use recur for tail call optimization in Clojure, though it's messier than Scheme. > Note that recur is the only non-stack-consuming looping construct in Clojure. http://clojure.org/special_forms#Special%20Forms--%28recur%20exprs*%29 http://clojure.org/special_forms#Special%20Forms--%28recur%2...
- hga 11y agoI personally think there's something to be said for making tail recursion explicit, as Clojure on the JVM requires, although the greater mess is not good, especially for introducing the concepts, and Clojure on the JVM can't do all types of desirable tail recursion.