News for hackers. Stuff that matters.
Re:Python to Scheme to Assembly (2014) by jdpage on Tuesday March 24, 2015 @03:49AM (#9255318)
Tcl added this relatively recently. They use the "tailcall" command, which immediately replaces the stack frame of the current function with one for the new function. If I recall correctly, it doesn't do any checks for whether or not the call is actually a tail-call, so if you do something like

    return [expr [tailcall foo] + 1]
the return and expr simply never get executed, producing incorrect results (which I guess is slightly better than a potential stack overflow, since even the most basic of tests will pick up on the missing +1).

There are no comments on this comment yet.