[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ((LAMBDA ())) => NIL ?



I think programs which construct programs need the flexibility of having
((LAMBDA ())) and (PROGN) return NIL. Interlisp users should be happy with
that since omitted cruft seems to always be the same as a list of NIL's. 
Eg, consider a program which accepts a list of forms to evaluate on some
condition

	(DEFMACRO-FOO-CONDITION-HANDLER (&REST FORMS)
	   `(DEFUN FOO-HANDLER () ,@FORMS))

Do you want to tell the user that if he's zero'ing out what FOO-HANDLER
does, he must type (FOO-CONDITION-HANDLER NIL)? That's silly. It wants a 
list of forms to be EVAL'd. You don't want to evaluate anything; evaluating
NIL is not the same thing. Requiring the macro-writer to remember to write:

	(DEFMACRO-FOO-HANDLER (&REST FORMS)
	   `(DEFUN FOO-HANDLER () NIL ; sigh, in case of no forms...
		,@FORMS))

is just as bad. (LAMBDA (...stuff1...) ...stuff2...) should be like
(LAMBDA (...stuff1...) (PROGN ...stuff2...)) and I think there's really no
question that (PROGN) needs to return NIL. Program-writing-programs can
come up with the case of `(PROGN ,@STUFF) where stuff is NIL very easily
and making it an error is just asking for lossage. It's clear when it arises
that the guy didn't want to do anything. Why remove the obvious semantics
to force an error on a guy in a case where what he wanted was indeed the
original obvious semantics?