[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Object creation discussion (at last!)
- To: Moon@STONY-BROOK.SCRC.Symbolics.COM, Common-Lisp-Object-System@sail.stanford.edu
- Subject: Object creation discussion (at last!)
- From: Daniel L. Weinreb <DLW@ALDERAAN.SCRC.Symbolics.COM>
- Date: Thu, 16 Apr 87 08:02 EDT
- In-reply-to: <870416002258.1.MOON@EUPHRATES.SCRC.Symbolics.COM>
Date: Thu, 16 Apr 87 00:22 EDT
From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
If multiple initargs that fill the same slot are supplied, which value ends up
in the slot is indeterminate.
In what sense do you mean "indeterminate"? Do you mean "defined to be
one of those values, but not defined as to which of them", such that it
would be legal to use a random number generator to decide?
The :default-initargs defclass option is followed by alternating initarg
names and forms.
This syntax is a little bit strange, because usually, in Common Lisp, a
"variable" and the form that specifies the initial value of the
"variable" are kept close together, textually. LET and DEFSTRUCT are
both examples. The now-documented :initform works that way too. What
is the motivation for moving these forms into a defclass option?
The class-initargs function takes a class and returns a list of initarg-name
symbols. These are all of the initargs accepted by make-instance of that class.
How does it know all the initargs that are accepted, without
"understanding" the code of every initialize-instance method?