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

CLOS vs FLAVORS questions



In the near future, I intend to start hacking a medium large system and
am considering using CLOS on Symbolics platforms.  I'm seeking comments
and advice to help me decide if this is wise.  I have read the SIGPLAN
special issue on CLOS, Keene's book, and the documentation provided by
Symbolics.  I'm trying to understand if CLOS compares favorably to the
current flavors capability.  Some particular questions are:

Are CLOS programmers really able to use the dispatch-on-multiple-args
capability effectively?  Does EQL dispatching get used in nontrivial
ways (same argument specialized sometimes by class, sometimes by a
symbol, etc.)?

I found the flavors MIXTURE option very useful.  In your experience,
does the dispatch-on-multiple-args capability compensate for the loss
of MIXTURE?  The alternative seems to be dynamic evaluation of DEFCLASS.
What are other techniques to get some of MIXTUREs capabilities?

On the surface of it, the repetitive use of WITH-SLOTS and/or
WITH-ACCESSORS appears to be insidious and tedious.  There seems to be
a lot of extra work for the common case where a method only specializes
on one arg.  Has your experience shown this to be a groundless fear on
my part?

In my application, I invision using the CLOS first-class capability to
change an instance's type so that different methods become applicable as
the object moves through its life-cycle.  (I know that flavors does not
have a first-class set of tools to do this.)  Are implementations of
this capability efficient enough to really be used?

My reading of part of the CLOS spec was ambiguous.  The case I have in
mind concerns reevaluating a DEFCLASS where I have implemented methods
to assist in the "correction".  If I only do one redefinition, I don't
have any questions.  If I do TWO (or more) redefinitions and I define
helper methods for each, do the CLOS semantics guarantee that all sets
of helper methods get executed and in the proper order?

Another puzzle for me was the use of the DEFINE-METHOD-COMBINATION option
:IDENTITY-WITH-ONE-ARGUMENT.  Consider the operator "+" and note that
"(+ (F))" is not the same as "(F)" if "F" returns multiple values.
What are the actual, intended semantics of this?


I would appreciate any comments on these questions and any other reports
of impressions and experiences with CLOS.  In particular, I'm interested
in same to help compare generic function systems (CLOS) and message
sending systems (FLAVORS).