

Function calls are not stack frames - edw519
http://ezrakilty.net/research/2009/11/function_calls_are_not_stack_frames.html

======
oconnor0
"Maybe we want to know the call structure at runtime; in that case, we should
capture that as debugging information, or as a reflection feature of the
runtime system, but not as a core language design. Let the language
implementation use the stack as efficiently as possible!"

Thank you. I don't know what the fear of implementing tail-calls without stack
frames is, but I've heard it a bunch of times & the argument often seems to be
- "we need stack traces". If that is essential, implement it as debug info &
let the language spec be fast & powerful.

~~~
wingo
I don't understand why those people that clamor for stack traces don't also
clamor for full histories of their programs' execution.

It's as if we do the loop:

    
    
        for (x=5; ; x--)
          y += 1/x;
    

And when it throws an exception for dividing by zero, you should want a full
"backtrace", with a "frame" for each iteration of the loop.

That's no different than demanding a stack trace for:

    
    
        (define (loop x)
          (set! y (+ y (/ 1 x))
          (loop (- x 1))
        (loop 5)

