proper tail calls

Jon Zeppieri jaz at bu.edu
Thu Jan 24 16:19:16 PST 2008


On 1/24/08, Lars T Hansen <lth at acm.org> wrote:
>
> Either the spec will mandate proper tail calls in a set of clearly
> defined situations, or it will not mention them at all.  The set
> should be ambitiously large, but it also needs to be describable.
> Anyhow, an implementation will always be allowed to handle more tail
> call situations (exposed by sophisticated analysis or an ambitious
> implementation, say) than the spec defines.

Yes, and this brings up a point I mentioned briefly in the trac
ticket.  Assuming that both implicit tail calls and an explicit tail
assertion end up in the spec, the assertion's behavior should be
specified in terms of the conditions under which implicit tail calls
must occur in any conforming implementation.

In other words, even though implementations are allowed to handle more
tail call situations than specified, the assertion should only succeed
in the specified situations.  Otherwise, the assertion is useless for
writing portable code.



More information about the Es4-discuss mailing list