2009/4/3 Jon Harrop <j...@ffconsultancy.com>:
>
> On Friday 03 April 2009 14:18:32 Robert Fischer wrote:
>> Jon Harrop wrote:
>> > The state of the art in all of the major "functional" languages for the
>> > JVM (Scala and Clojure) is that they die with a stack overflow because
>> > the JVM lacks tail calls. :-)
>>
>> That's odd.  I've been programming with Scala for a while now, and haven't
>> had this issue.
>
> Search for "stack overflow" in the Scala compiler's own bug tracker. :-)

Yes. Because all stack overflows are clearly caused by a failure of
tail recursion...

Except that in the real world the only issue you'll find that's even
slightly relevant is that List.equals isn't properly tail recursive
because of these issues (which is a pain, but can be circumvented).
Basically all stack overflows within the compiler itself that I'm
aware of are from the type checker, which you'd have a very hard time
making tail recursive without converting it to CPS to reify the stack
onto the heap.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to