[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Implementation Questions
Date: Tue, 17 Nov 87 22:55 CDT
From: <LINNDR%VUENGVAX.BITNET@forsythe.stanford.edu> (David Linn)
If defun is a macro, to what does it expand? My best guess would be
a (setf (symbol-function 'name) ...) based on the discussion of
symbol-function on page 90. My question then becomes: Into what
does the setf form expand? Is it intended that the update function
for symbol-value have an implmentation-dependent name?
^^^^^^^^^^^^
You meant SYMBOL-FUNCTION there, didn't you?
The same sort of question applies to the update function for
macro-function.
MOST update functions have implementation-dependent names. There are no
Common Lisp updaters for CAR, CDR, AREF, defstruct accessors, etc. The
only accessors I can think of offhand that have defined updaters are
SYMBOL-VALUE (the updater is SET), LDB (DPB), LOAD-BYTE (DEPOSIT-BYTE),
and CHAR-BIT (SET-CHAR-BIT).
2) LAMBDA-LISTS - Is the order of lambda-list keywords fixed? (p. 60)
Will the order alway be &optional/&rest/&key/&aux (meaning that
if the keyword is used, it will be in the order given)?
It seems likely that this is so but I'm not sure.
Since it doesn't say that they can be in any order, don't assume that
they can. I know some implementations are picky. The description shows
the order that is defined to be portable; if a program supplies them in
a different order then it "is an error".
I think there was a proposal in X3J13 regarding relaxing this somewhat,
but I'm not sure. On the other hand, perhaps the proposal was to make
the text explicit about the order requirement.
barmar