[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Comments on final portion of Chapter 2
These comments apply to slot-boundp through with-slots. I'll try
to comment on chapter 3 tomorrow.
2-66 first sentence: this uses the term "bound" where elsewhere in the
document we use "not uninitialized". Admittedly there is some incoherence
between the function names and the document terminology, but I think the
document should be self-consistent and specifically relate to the term
"uninitialized" here.
2-66: Add a remark that if no slot by that name exists, we do
(SLOT-MISSING (CLASS-OF instance) instance slot-name 'SLOT-BOUNDP).
2-68: ditto
2-71: ditto (cover setf case too). Also cross-reference slot-unbound.
================
2-69 slot-missing should say under Values what gets done with
the values, if you write a method that returns some instead of
signalling an error. They get returned as the values of the original
function invocation.
2-70 ditto for slot-unbound: the value is returned in place of
the slot's value.
================
2-72: symbol-class of a symbol that is not cboundp should signal
an error, not return nil.
================
2-73: Clarify how -expansion- is used. Each reference to -symbol-
as a variable, that would be in the scope of a binding of -symbol-
as a variable at the point of the SYMBOL-MACROLET, is replaced
by -expansion- (-not- the result of evaluating -expansion-).
================
2-73: symbol-macrolet is a special form rather than a macro,
if it really works the way the last Remarks paragraph says. On
the other hand, if it works by making substitutions in its body
and returning the modified body, then it's a macro. The latter
implementation is easier for implementors of course, since they
don't have to change their interpreter, compiler, and tools to
understand a new special form and new kind of macro.
================
2-74 last Purpose sentence: update-instance-structure is not called
by change-class. It's called by something that doesn't have a documented
name inside the mechanism activated by make-instances-obsolete.
================
2-74, -75: rho and theta have been interchanged in the
update-instance-structure, (setf position-x), and
(setf position-y) methods, but are correct in the position-x
and position-y methods. Theta is the one to be set to atan.
So much for the perspicuity of greek letters.
================
2-78 first sentence: "setf generic function" again.
================
2-78 second bullet: calling change-class can't be right, this creates
a new generic function, it doesn't mung an existing one.
================
2-80 first Arguments paragraph: Are we sure we want to signal an error
for with-slots of a standard-type class? Why not use the normal
slot-missing mechanism? Of course we can't actually signal an error
here, because some standard-type classes can be implemented as standard
classes. But if this was changed to speak of built-in-class, it could
signal an error, but I still think it should go through slot-missing.
2-80 third arguments paragraph: ditto.
2-80 second Arguments paragraph: delete this paragraph.
2-81 third Remarks paragraph: ditto.
================
OPEN ISSUES:
2-78: what does with-added-methods do if -name- has a function definition
already, but the function isn't generic? Does it ignore it, signal an
error, or copy it into a default method? Signalling an error seems
safest.
================
TYPOS:
2-69 first Remarks paragraph: remove two spurious right parentheses.
2-73 first Remarks paragraph: "into calls to generic function", add "s".
2-75 first bullet: "each local slot in current class definition",
add "the".
2-78 paragraph 2: that's "defgeneric", not "def-generic".
2-78 first bullet: "has different value", add "a".
2-80 last Arguments paragraph: "the use of symbol", add "a".
================