aspects of MOP (was: class, prototype, meta)

jecel at jecel at
Mon Mar 2 03:31:49 UTC 1998

I wrote a paper on bootstrapping a reflective system that might
be of interest to some people on this list:

An updated version of that paper is a chapter in this book:

  "Advances in Object-Oriented Metalevel Architectures and Reflection"
  Edited by Chris Zimmermann
  CRC Press, 1996, ISBN 0-8493-2663-X

This was intended to complement "The Art of MOP" so it might
also interested somebody here (though it is a bit expensive).

About Aspect Oriented Programming: a key feature of a good MOP
is the "separation of concerns". That is, you shouldn't have
to mix base-level code and meta-level code in a single source.
It would be nice to be able to entirely write the base-level
program (and even test) and then turn your attention to meta-stuff
and write it separately (for better understandability and
reusability). An example where this doesn't happen is when
your meta-language is in the form of annotations (or "pragmas").
If you segregate the meta-level into special objects, you
get much closer to this goal.
Now it happens that this separation of the sistem into
two "aspects" (the base-level and the meta-level) is simply
too simplistic. We could go a step further and separate the
data distribution aspect of the application from the                  
communication protocols aspect. You might find it useful to
also break up the base-level into separate parts (like
VRML separates the 3D structure aspect from the interaction
aspect by coding them in totally different languages). So   
the main idea is to write several simple programs in         
specialized languages. But this is not to be confused with
some kind of modular programming! The compiler must "weave
together" the sources from all different aspects into
a single object code. Please see the AOP pages for an example.
This is closely related to implementing reflection by doing
a partial evaluation of the meta-level and sticking it into
the base-level's object code.

The bottom line is that I find AOP very exciting, but not
really needed if you have a *very* good MOP.

-- Jecel

More information about the Squeak-dev mailing list