proper tail calls
Lars T Hansen
lth at acm.org
Thu Jan 24 15:54:15 PST 2008
On 1/24/08, Nathan de Vries <nathan at atnan.com> wrote:
> On Thu, 2008-01-24 at 20:04 +0100, Chris Pine wrote:
> > It was agreed that implementations would always be free to implement
> > PTC...
> Really? That wasn't the impression I got. My understanding is that if
> PTC isn't a requirement, it should not exist. As a programmer, I don't
> want to need to keep track of whether which implementations support my
> programming style. Do we really want "ES4" and "Stackless ES4" (for
> Peter Michaux put it nicely when he said:
> > If there are no requirements for proper tail calls then they cannot be
> > depended upon and are useless.
> Portability is a huge requirement for me, and if there's a valid reason
> for leaving PTC out of an implementation history shows that someone
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.
More information about the Es4-discuss