proper tail calls

liorean liorean at gmail.com
Tue Jan 22 11:39:03 PST 2008


> On Jan 22, 2008, at 11:03 AM, Neil Mix wrote:
> > I also want to make clear: this isn't about debugging code that uses
> > PTC intentionally -- that tradeoff is up to the developer.  This is
> > about the novice coder who finds a stack trace on a production system
> > from code that he doesn't own which just happens to be invoking PTC
> > implicitly.

On 22/01/2008, Brendan Eich <brendan at mozilla.org> wrote:
> I've already copped to low expectations about current-era debuggers,
> and it is possible the same dismal view applies to logging traces, at
> least on my part. Having to deal with a stack backtrace where you
> (n00b or l33t, doesn't matter) have to hop around in 3, or 30, source
> files to see how the heck control flowed from function f to g when f
> doesn't call g, is Not Fun. The lack of stack traces in ECMA-262, and
> anything like Python's much better backtrace support in JS
> implementations, may be remedied, and then we'll all feel PTC pain.

Maybe it'd make sense to have some "use
ImplicitTailCallElimination=bool;" directives that can be used to make
sure an implementation has or lacks implicit tail call elimination
when running the code, still having explicit TCE possible even with
"use ImplicitTailCallElimination=false;", leaving the default
behaviour for implicit TCE up to the implementation? Or would that be
three ways too many to handle it?
-- 
David "liorean" Andersson



More information about the Es4-discuss mailing list