proper tail calls

Peter Michaux petermichaux at gmail.com
Mon Jan 21 12:44:34 PST 2008


On Jan 21, 2008 9:59 AM, Erik Arvidsson <erik.arvidsson at gmail.com> wrote:
> On Mon, Jan 21, 2008 at 8:57 AM, Peter Michaux <petermichaux at gmail.com> wrote:
> >  I think Haskell and ES are in different situations as a developer
> >  chooses a Haskel implementation for execution. ES4 code for the web is
> >  almost certainly going to run on multiple ES4 implementations. If
> >  there are no requirements for proper tail calls then they cannot be
> >  depended upon and are useless.
>
> As long as all the implementations have the exact same call stack
> limitation then that holds true.  However, I think it is unreasonable
> to enforce one call stack size fits all.
>
> I think we can all agree on that having explicit tail calls at compile
> time enforces all runtimes to have proper tail calls?

I think "enforces" would be better as "strongly encourage". An
non-conforming implementation could pretend it is conforming and just
lie.  "Suurrre we'll do that as a proper tail call, no problem, good
idea." ;-)

Peter



More information about the Es4-discuss mailing list