What is the current state of the art for language implementers working around these issues (tail calls, continuations, etc) in Clojure, Scala, JRuby, etc?
I would imagine people are maintaining their own stacks? stacks and hacks. :-) Sounds like Dr Seuss...I will not hack upon your stack, i'll hack my stack to get you back. We have talked about the fact that certain programs are invalid without TCO because they will overflow the stack - true enough. Does anyone have any crude benchmarks re the perf overhead of doing these things in hand rolled stacks vs. at the byte code level. I have to imagine it is massive for certian classes of programs. On Thu, Apr 2, 2009 at 9:59 AM, kirk <kirk.pepperd...@gmail.com> wrote: > > John Cowan wrote: > > On Thu, Apr 2, 2009 at 10:36 AM, kirk <kirk.pepperd...@gmail.com> wrote: > > > >> why do they have to be exposed? Isn't tail recursion and implementation > >> detail? And an optimization at that? > >> > > > > No. > > > > Being able to rely on tail recursion is not an implementation detail; > > Scheme programmers routinely write programs that tail-call heavily and > > would blow up without it. A state machine implementation where state > > transition codelets, expressed as functions, are tail-called by the > > dispatcher and tail-call it in turn is a classic example. "Lambda: > > the ultimate goto." > > > Understood, that said I think Patrick hit the nail on the head. > > And since Java exposes the call stack via Exception#fillInStack, the > > *presence* of tail recursion is unfortunately not an implementation > > detail either. > > > I would humbly disagree with this last statement. > > Regards, > Kirk > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---