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

FUNCTION and MACROLET



    I'm not sure I agree that it would be an incompatible change to
say that calling SYMBOL-FUNCTION with a non-function symbol is an
error.  The current manual guarantees nothing about what is currently
returned, so no portable program can use SYMBOL-FUNCTION on
non-function symbols.  Saying that it "is an error" to use
SYMBOL-FUNCTION on non-functions wouldn't require anyone to change
anything, since implementations can choose to define SYMBOL-FUNCTION
to do whatever it currently does in the non-function case.

    The only discernible use for SYMBOL-FUNCTION on non-function
symbols is setting the SYMBOL-FUNCTION of one symbol to be the same as
that of another:
  (setf (symbol-function 'new-macro) (symbol-function 'old-macro))
Note that nowhere in the manual does it say that this will work.
There is no need to define it to work, since MACRO-FUNCTION can do the
same job better.

  Rob