From ... From: Erik Naggum Subject: Re: how to validate input? Date: 2000/04/25 Message-ID: <3165662049043666@naggum.no>#1/1 X-Deja-AN: 615481146 References: <87wvlv75lf.fsf@inka.de> <3165639388940721@naggum.no> mail-copies-to: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsmaster@eunet.no X-Trace: oslo-nntp.eunet.no 956673322 19786 195.0.192.66 (25 Apr 2000 14:35:22 GMT) Organization: Naggum Software; vox: +47 8800 8879; fax: +47 8800 8601; http://www.naggum.no User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.5 Mime-Version: 1.0 NNTP-Posting-Date: 25 Apr 2000 14:35:22 GMT Newsgroups: comp.lang.lisp * Joe Marshall | Technically, tail recursion and _first-class_ continuations have little | to do with each other. not so, they are conceptual twins, and it would be silly to try to specify one without the other, even if it is technically possible to ignore the other half of the conceptual solution. at the heart of the matter is whether a function call frame is heap-based or stack-based, but this is _not_ an implementation issue alone, it has to do with the whole concept of the "lifetime" of a function call. tail recursion keeps the function call alive across function entry boundaries, i.e., entering a function does not mean you have a fresh call frame. continuations keep the function call alive across function exit boundaries, i.e., exiting a function does not mean you dispose of all inferior call frames. both invalidate the trivial concept of a function call that always exist at the leaf of a call tree and which can be talked about with a concept of identity, or in brief: the function call that differs conceptually from function calls in the popular literature and programming community. I find it interesting that several for-education languages have flirted with the heap-based call frame, but none of them have become popular, and current (very) popular hardware is also "unwilling" to make this run as fast as the much simpler stack-based call frame. even register-rich hardware has chosen to make stack-based call frames very efficient, and heap-based call frames slow and requiring a lot of manual caretaking. this is not accidental, and it should not be dismissed as "oh, that's just hardware", which is an expression of the unhealthy arrogance I see in these for-education languages. in my view, requiring proper tail recursion and first-class continuations is evidence of an unwillingness to deal with implementation issues. in a specification, such unwillingness is just too arrogant to be a good sign, especially when it is attempted covered up or not even explained. #:Erik