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

Re: Special Form Question

    Date: 16 Dec 85 13:03 PST
    From: glacier!masinter.pa@Xerox.ARPA

    It would be more consistent and portable to define
    (symbol-function 'quote) => nil.

    under the theory that "symbol-function" really means to return a
    function rather than "what this symbol means when seen as car of
    something to be EVAL'd."

    Similarly, it would be more consistent and portable to require that
    after (defmacro foo --) that (symbol-function 'foo) also return nil.

    This would mean that values returned by symbol-function could be assumed
    to be functions, in the "funcall-able" sense.

    It is likely that implementations will want to have some internal
    "really give me what this symbol means when you see it as the CAR of a
    form about to be EVALd" for use by the interpreter, but its not clear to
    me why that primitive has to be "symbol-function".

Alternatively, you could leave symbol-function as the thing that
accesses a symbol's "function cell", and provide a new function that
is the same as FUNCTION, except that its argument is evaluated.  It
could be applied to things other than symbols (e.g. lists with CAR =
LAMBDA).  Call it FEVAL??  Then you could eliminate lambda
expressions as functions (the only argument for them was that you
needed to be able to construct functions on the fly -- now you can
construct lambda expressions and use FEVAL to turn them into