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

[no subject]



    Date: 9 June 1980 01:30-EDT
    From: Kent M. Pitman <KMP at MIT-MC>

    ...

    EVAL-WHEN is truly a special form. It has a functional definition
    only in the interpreter (ie, only (EVAL-WHEN (... EVAL ...) ...)
    ever really gets eval'd on its on merit). The COMPLR and FASLOAD,
    as near as I can tell empirically with TRACE, never call EVAL-WHEN
    -- I presume they do (AND (EQ (CAR form) 'EVAL-WHEN) (MEMQ
    interesting-state (CADR FORM)) ...)  type things.

"SETQ is truly a special form.  It has a functional definition only in
the interpreter.  The COMPLR and FASLOAD, as near as I can tell
empirically with TRACE, never call SETQ ..."

OK, I am convinced, EVAL-WHEN (like SETQ) is a special form.

    		 Hence, EVAL-WHEN is *NOT* meaningful (read:
    `legal') except as a toplevel form.

"Hence, SETQ is *NOT* meaningful except as a toplevel form."

URK. Let us ignore the beginning of your note, since your conclusion
(that EVAL-WHEN is probably only reasonable at toplevel) is valid,
despite the faulty reasoning that got you there.  But note please,
that I never suggested otherwise.

    			Hence, its return value should be of as
    little consequence as possible to discourage relying on it ... The
    only use for having it return T/NIL might be in tracing of
    EVAL-WHEN's consed up by macros, but that seems pretty marginal to
    me.  I think I would advocate it always returning NIL. In any
    case, I believe this all to be site-dependent as I am pretty sure
    I didn't tell Bernie about T/NIL return-values when he was doing
    the Multics-flavored version of this a month or two ago.  

Well, in fact the Multics version also returns T/NIL just like the ITS
version.  But, so what?  Nobody ever really cared what it returned as
far as I could tell, so I suggested a reasonable change that would
increase the elegance of the situation.  (PROGN 'COMPILE ...) could
also be looked upon as such an animal, and it returns its last value.

							      For
    further `support' of this feeling, note that the compiler will not
    allow it in function definitions.  -kmp

Again, the toplevelness is not an issue here.