On Friday April 3 2009, John Cowan wrote: > On Fri, Apr 3, 2009 at 12:14 PM, Robert Fischer > > <robert.fisc...@smokejumperit.com> wrote: > > As has been stated on this very thread a number of times, at least > > the major functional languages have already dealt with tail call > > recursion, often via trampolines. So while Java might stack > > overflow on tail call recursions, Scala, Kawa, and Clojure won't. > > On the contrary. Scala will overflow, because it does not > trampoline. Clojure will overflow, because it does not trampoline; it > has highly localized tail recursion for looping. Kawa can be > compiled either way, but the default will overflow, because it does > not trampoline.
Clojure has trampolines that must be expressly used by the programmer, just as its tail-call optimization construct must be used explicitly when that's what you want. The compiler confirms that a tail-call is really in tail position rejects the code if it is not. Randall Schulz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to jvm-languages@googlegroups.com To unsubscribe from this group, send email to jvm-languages+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---