[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: initializing class slots

        (defclass A () ((s :initform 1 :allocation :class)))

    By the way, I could not find anything specific in the document
    that says how initforms work for class slots.  For example, exactly
    when is the initform evaluated?  At the time of the evaluating of
    the containing defclass?

Yes and No.  It is no because it is really at the time the class is
defined.  Compiling a file with a defclass will expand the defclass into
something else, and that will evaluate at load time.  But for ordinary
loading of files (or evaluating the form in a listener) the answer is