New feature: initialization keyword arguments.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 15 Dec 2015 19:15:23 +0000 (19:15 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 29 May 2016 14:09:04 +0000 (15:09 +0100)
commitb2983f3591981a916f748362d91ff0e2817552cb
treea155fc717b61eb406ef244a1630ec7ab25cd67ec
parent43ce48fd4112471e4c7ef083297688fc45add4a8
New feature: initialization keyword arguments.

Initialization keyword arguments can now be declared in class
definitions.  They become additional keyword arguments accepted by the
object's `init' effective method.  The initialization arguments are
available for use (by name) within slot initializer expressions and
initialization fragments.

  * `User' initargs are otherwise passive.  They may usefully have a
    default value, which is used if the argument is
    omitted.  (Alternatively, user code can test the `suppliedp' flag
    and behave accordingly.)

  * `Slot' initargs are associated with an effective slot.  If one of a
    slot's initargs is provided in the `init' message, then its value is
    used to initialize the slot, instead of the slot initializer.  If
    more than one applicable initarg is provided, then priority is given
    to the initargs defined in more specific superclasses; if this
    doesn't disambiguate, then one of the initargs is chosen
    arbitrarily (this situation is likely an error).
15 files changed:
doc/SYMBOLS
doc/concepts.tex
doc/layout.tex
doc/meta.tex
doc/syntax.tex
src/builtin.lisp
src/class-finalize-impl.lisp
src/class-layout-impl.lisp
src/class-layout-proto.lisp
src/class-make-impl.lisp
src/class-make-proto.lisp
src/classes.lisp
src/module-parse.lisp
src/sod-module.5
test/test.sod