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

Re: initialization meeting notes



    From: Moon

    (One line of the above has been uppercased, the only ASCII way
    to highlight it.)

    I hope this is an erroneous example, and you're not really
    proposing that otherwise-uninitialized slots should be initialized
    to NIL.

Yes, this example is erroneous.  What I was trying to capture was that
an :after initialize-instance method would be able to tell if a slot had
been set.

    I thought we agreed that defclass would translate the initforms
    into functions and at the metaclass level they would appear as
    functions.  I don't think we need a new way, besides lambda, for
    capturing lexical environments.  (Of course implementations are not
    required to make new functions in all cases; especially in the case
    of constant initforms, they will probably make a closure of an
    existing function.)  This implies that one cannot use metaclass
    protocol to recover the original forms that appeared in the
    defclass.  Maybe we didn't agree on this, I couldn't find anything
    about it in my notes from the meeting.  Can we converge on this now?

I remember now that we had agreed that both initforms and default
initargs would be translated into functions by defclass.  Note that this
does not necessarily mean that its impossible to reconstruct the
defclass form for a class.  We could say that at the metaclass level,
there is a separate mechanism for communicating the form that was in the
defclass.

But I would just as soon agree that there is no such mechanism at the
metaclass level.  Actually, I think the fact that Common Lisp doesn't
have first class lexical environments means that its impossible to
construct an 'equivalent' defclass form which an editor might put up for
the user to edit a little and then re-evaluate.  Only specific
implementations, in an implementation specific way will be able to do
this.

On the other hand, if Common Lisp had first class lexical environments,
this would be easy.  An unemployment would be lower.  And the national
debt would be under control, and glphh... uh...