On Fri, Dec 18, 2009 at 3:28 PM, Per Bothner <[email protected]> wrote:

> Tail-call optimization is not a pure optimization, as it changes the
> semantics in a fundamental way:  It removes stack traces, which are
> part of both observable behaviour (stack traces) and the Java security
> architecture.  Conversely, the lack of tail-call optimization when it
> is expected (or demanded by some [non-Java] language specification)
> means that a program that should run in finite memory will run out of
> stack.

Indeed.  We need to be careful to distinguish between tail-calling as
an optimization and proper tail calling as a language feature.  We
also need, while I'm at it, to distinguish between mere tail recursion
and generalized tail calling.  I've been hammering on these
terminological confusions lately; it's all too easy for people, even
people who know better, to write "TCO" when they mean "proper tail
calling".

-- 
GMail doesn't have rotating .sigs, but you can see mine at
http://www.ccil.org/~cowan/signatures

--

You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en.


Reply via email to