[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tail recursion
Date: Sat, 21 Apr 90 10:22:56 edt
From: jinx@zurich.ai.mit.edu (Guillermo J. Rozas)
Reply-To: jinx@zurich.ai.mit.edu
No, of course not. It's not a semantic property; it's an
implementation property.
I don't agree with you. You can have semantics at different levels,
depending only on how much magnification you want out of the semantics
microscope. It should not be hard to write a semantics with explicit
memory management where both of these properties are explicit. Of
course, the semantics would be (in most ways) much less informative
than the usual semantics that ignores such aspects.
The way that I like to define proper tail recursion is as follows:
[... deleted ...]
Just to be clear about where I stand:
I think the definition you present is very interesting and seems likely to
work, for all I can see now. I have no problem with -- in fact, I am strongly
in favor of -- including in the specification of Scheme the requirement that a
correct implementation be properly tail-recursive, and also including the best
definition we collectively can think of of what that means, which may very well
turn out to be the one you offer.
But I don't think that this is a *semantic* property, for the very simple
reason that it doesn't affect the *value* computed by any program under any
circumstances; it only affects whether a given program can be run on a given
implementation.
I guess this is a semantic argument. :-)
-- Scott