From: Hoehle, Joerg-C. <Joe...@t-...> - 2007-06-08 15:15:44
|
Hi, here's what I came across recently: o impnotes =A75.1.1 "It is an error if a DEFCONSTANT variable is bound = at the moment the DEFCONSTANT is executed, but DEFCONSTANT does not = check this." Misleading, as a warning is issued. o impnotes =A75.1.6 mentions ext:get-setf-method and -multiple-value. Perhaps it should generally say that ext: contains symbols and (working) functionality from CLtL2 removed from ANSI-CL (and list these, perhaps as chapter 29.3). E.g. for a few minutes I was wondering whether get-setf-method was a CLISP-specific addition. Then I got my CLtLII book. It could then explain that get-setf-method differs from = get-setf-expansion in ensuring that a single store form is produces, = otherwise an error is signaled. o impnotes =A75.1.8 "Calling SYMBOL-VALUE on a symbol defined as a = SYMBOL-MACRO returns the value of the expansion. Calling SET on a symbol defined as a SYMBOL-MACRO calls SETF on the expansion." Wrong, there was a change 2005-01-05 to remove that logic. These days, SYMBOL-VALUE signals an error, SET accesses the symbol-value cell. Just remove that paragraph or mention slot access and/or document an incompatible change? (impnotes doesn't seem to document changes). Imnotes is wrong again: "Calling BOUNDP on a symbol defined as a SYMBOL-MACRO returns T." These days: CL-USER> (define-symbol-macro weird-2005 *print-case*) WEIRD-2005 CL-USER> (boundp 'weird-2005) NIL CL-USER> weird-2005 :UPCASE So (boundp foo) presumably still implies (symbol-value foo) succeeds, = but impnotes need be changed to reflect past 2005 behaviour. o impnotes does not mention that and how PUSH, POP and PUSHNEW operate = on VALUES places, although the code explicitly deals with multiple stores (i.e. it's not a side effect of the implementation), while e.g. sbcl and = cmu error out. ; push and pop on VALUES places (multiple-value-list (let (a b) (push (values 1 2) (values a b)))) ((1) (2)) (let (a b) (list (multiple-value-list (pushnew (values 1 2) (values a = b))) a b)) (((1) (2)) (1) (2)) o impnotes =A76.2 "The macros DOLIST and DOTIMES establish a single binding for the iteration variable and assign it on each iteration." However, DOLIST's result form introduces a separate binding: (dolist (i '(1 2 3) i) (push i a)) -> (DO* ((#:LIST-3945 '(1 2 3) (CDR #:LIST-3945)) (I NIL)) ((ENDP #:LIST-3945) (LET ((I NIL)) (DECLARE (IGNORABLE I)) I)) (DECLARE (LIST #:LIST-3945)) (SETQ I (CAR #:LIST-3945)) (PUSH I A)) I don't remember the discussion on this issue, but I understand that one doesn't want type conflicts with declarations and the final case where "At the time result-form is processed, var is bound to nil.". I.e. the list element type may not encompass NULL, while NULL is the type needed for the result form. I think impnotes must document the special treatment in the result form. o impnotes 30.11.2 LETF Add(?) something along "A single UNWIND-PROTECT is used to restore the original places, thus in case of errors therein [the restore execution], a nested series of (LETF* # (LETF* ...)) behaves differently from a single (LETF* (1+2) ...)." Regards, J=F6rg H=F6hle |