4 ms·
Will there be a tail recursion on jvm?
by stralep 17y ago
Will there be a tail recursion on jvm?
- strlen 17y agoIt's possible to tail recursion on the JVM, especially with a statically typed language (see Scala for a classical approach, see Clojure's loop/recur for a slightly different approach). Not tail call elimination and mutual recursion, however. That is, however, if you want the compiler to output code that's fully backwards compatible with Java (which is what Scala and Clojure do).
- gtani 17y agolate hit: I've seen chatter that scala has TCO, clojure doesn't (kinda like, what's wrong with clojre?). Read what Rich hickey has to say http://groups.google.com/group/clojure/msg/946d98e5b88a6497 http://groups.google.com/group/clojure/msg/946d98e5b88a6497