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

Special Form Question



You do come up with the most imaginative questions...

We clearly do not require that

(setf (symbol-function 'foo) (symbol-function 'quote))

somehow makes foo act like quote.  Nor do we explicitly require this to
signal an error.  The case that you describe is so perverse that I do
not think it is worthwhile for those implementations that use something
like internal FEXPRs in the interpreter to bother checking that they are
being called in a legitimate way.

I think the best position to take is the following: Symbols that name
special forms do have symbol-function slots, just like any other symbol.
The implementation is allowed, but not required, to put some strange
object in that slot, and we cannot prevent users from getting their
hands on this object if it exists.  However, the nature of this object,
if it exists, is completely unspecified and users cannot count on doing
anything useful with it.  It is an error to funcall or apply this thing,
or to stick it in a symbol-function slot of some symbol and then
evaluate a form with that symbol as the Car.

-- Scott