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

mop questions

Gregor & co.,

Here are my initial impressions of The Art of the Meta-Object Protocol
(AMOP), based on a more-or-less complete single reading.  A more
detailed review will follow.

It's quite well written; the exposition is clear and straightforward
without many side distractions.  It's a good example of good
programming, which is something the world always needs.  Within the
limits of CLOSETTE and CLOS, the examples are well thought out and
very well motivated.  The approach in chapter 3 of discussing ways to
implement some of the full power of CLOS in CLOSETTE was particularly
interesting to me.

On the other hand, what I was really hoping to see was more
exploration of the space of potential MOPs (and reflective object
systems in general) and some justification of the actual CLOS MOP.
The principles elucidated in Chapter 3 and Chapter 4 are steps in the
right direction.  I like the sections dealing with general protocol
design considerations and how they apply to the MOP.  However, it is
not a general presentation of protocol problems nor a complete
discussion of the MOP.  For instance, in section 3.5 there is a
discussion of the difference between making SLOT-VALUE generic and
using SLOT-VALUE-USING-CLASS.  However, there is no explanation of why
the CLOS MOP chose the latter approach, or of other alternatives for
the slot access protocol.

On the whole, this is a fine and much-needed book, but certainly not
the last word on the subject.

Now, I have a few questions about MOP details.  I'm sure I could think
of a thousand more, and maybe I will.

1. Why does DEFCLASS expand into ENSURE-CLASS instead of
MAKE-INSTANCE?  (Ditto for other defining macros.)

2. Why are slot readers/writers/accessors created and bound inside of
INITIALIZE-INSTANCE instead of in their own defining forms (eg

3. When Danny was here some months ago, he mentioned the possibility
of reifying specializers into "specializer metaobjects".  Was anything
more written or discussed about this?  There seem to be hooks in the
MOP, and one brief footnote in AMOP, but no explicit discussion.

4. Why does the function GENERIC-FUNCTION-NAME exist, aside from

5. Is CLOS supposed to detect when new methods are added to reader or
writer generic functions, when those new methods do not access the
same slot as the original generic function?  This question arises from
the existence of the function METHOD-SLOT-NAME.

6. Do you intend there to be any sort of correspondence between slot
allocation as given by the :ALLOCATION slot option and the class of
the slot definition metaobject?  I don't think so, but is this at
least a viable implementation approach?

7. Would the intended CLOS way to implement, for example, slot facets
be with new class metaobjects as we see in section 3.3 of AMOP, or by
defining new slot definition metaobject classes?  If the answer is the
former, what would be a good reason to do the latter?

-- Harley

PS I'll send my comments about the implementation and user extension
restrictions in a separate message.