Subject: Re: how to validate input? From: Erik Naggum <erik@naggum.no> Date: 2000/04/26 Newsgroups: comp.lang.lisp Message-ID: <3165721740371421@naggum.no> * ds26@goldshoe.gte.com (Dorai Sitaram) | But tail-call optimization doesn't suffer from this arrogance. Quite to | the contrary, it is more efficient use of the popular stack-based call | frame in current, popular hardware. I have looked around at implementations, and what I have found is that the old call-frame is basically unwound to the exact same point where a return from the function would occur, then a jump to the new function takes place instead of a call, and a new call frame is set up, just as if it were a normal function call. the savings is realized in that the depth of the stack is not increased, but other than that, nothing, and there is much loss to go with this gain: information about the caller no longer exists. | Again, I don't see how tail-call optimization can be tarred with the same | brush as first-class continuations in this regard. TCO is precisely a | willingness to deal with implementation issues. In fact, I've known | semanticists to express dismay that TCO deals with "grubby" | implementation choices. the point I'm trying to get across is that _requiring_ proper tail recursion is different from _optimizing_ for tail calls as an option. the requirement is very much a semantic issue. I'm all for optimizing tail calls when _I_ want to, and can make an informed choice. I'm against a requirement. please understand the difference. #:Erik