Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!cmcl2!harvard!topaz!ll-xn!mit-amt!mit-eddie!jbs From: jbs@mit-eddie.MIT.EDU (Jeff Siegal) Newsgroups: net.lang.lisp Subject: Re: Abusing "define" in Scheme... (car crashes?) Message-ID: <2049@mit-eddie.MIT.EDU> Date: Wed, 21-May-86 06:12:11 EDT Article-I.D.: mit-eddi.2049 Posted: Wed May 21 06:12:11 1986 Date-Received: Sat, 24-May-86 02:38:32 EDT References: <13508@ucla-cs.ARPA> <2048@mit-eddie.MIT.EDU> Reply-To: jbs@mit-eddie.UUCP (Jeff Siegal) Distribution: net Organization: MIT, EE/CS Computer Facilities, Cambridge, MA Lines: 36 Keywords: Scheme In article <2048@mit-eddie.MIT.EDU> psi@mit-eddie.MIT.EDU (Joseph J. Mankoski) writes: >In article <13508@ucla-cs.ARPA>, hydar@ucla-cs.ARPA (Dan Hydar) writes: >> >> >> Does anyone know if Scheme is defined such that ANY binding can be >> changed or is there some set of functions/identifiers that can be (or >> MUST be) prevented from being re-defined? > >[...]. Personally, I prefer the freedom to >redefine anything, though I still avoid redefining T, Lambda, and of >course, Define. Actually, redefining lambda or define would not change the meaning of expressions like (define a b) or (lambda (x) (* x 2)). These are are "special forms" and (if I remember my 6.001 correctly) the evaulator does not look for their definitions in the current context before actually doing the work involved (binding or procedure creation). So actually the list of indentifiers which can not be redefined is the list of special forms. Note however, that you can do the following: --> (DEFINE LAMBDA 1) LAMBDA --> LAMBDA 1 --> ((LAMBDA (X) (+ X 1)) 1) 2 LAMBDA has been defined as a symbol bound to 1, but this does not affect the normal usage of LAMBDA, which still works as expected(?). Jeff Siegal