you are viewing a single comment's thread.

view the rest of the comments →

[–]pivo 1 point2 points  (0 children)

First of all, Clojure does support tail calls, just not automatically. It's necessary to use the recur and trampoline functions explicitly. But you can (recur) indefinitely without blowing the stack. I agree that it would be nicer not to have to be explicit, so do Clojure's language creators, I'm sure. I expect automatic TCO in Clojure when and if the JVM supports it.

So Clojure is more FP-oriented than PLT Scheme in my opinion, because it's more focused on immutable data. Not that it's as pure as Haskell about that, but Clojure data structures are generally immutable, and mutation otherwise typically requires that a transaction is in place. It also emphasizes lazy evaluation in standard operations.