Getting rid of metaclasses (Was: Behaviors vs Modules)

Hannes Hirzel hirzel at spw.unizh.ch
Wed Feb 27 19:40:43 UTC 2002


On Tue, 26 Feb 2002, Robert Hirschfeld wrote:

> A while ago I started to work on AspectS, an environment to explore 
> aspect-oriented programming (AOP) in dynamic systems like Squeak 
> (http://www.prakinf.tu-ilmenau.de/~hirsch/Projects/Squeak/AspectS/).

I downloaded your preconfigured image and looked into it. The tip by Jim
Benson that he used your work on aspect oriented programming motivated me
to do this.

And I'm excited! Your AspectS work gives an easy way to look at the system
from different points of views (well - aspects) with the standard tools.
That's very nice! The examples you provide are easy to use. Even if one
doesn't want to go into the details of aspects, joint-points and advice.

Just to take the example which shows how to dynamically add test code on
all the #mouseEnter: and #mouseLeave: messages and do an analogous one for
other messages is very revealing! This allows to tackle the 1000 method
monster class #Morph!
 
(The example shows how to monitor all the 22 implementors of #mouseEnter
and the 19 implementors of #mouseLeave in the class #Morph and its
subclasses very easily)

> AspectS can also be used to implement roles/perspectives. One of the 
> differences between mixins/MI and aspects is that instead of letting 
> a set of classes decide from where to inherit additional behavior, 
> the aspect is responsible for adjusting existing behavior in or 
> distributing additional behavior to target objects. It is just the 
> other way around. Aspect instances in AspectS are regular objects 
> that can change the behavior of objects in the image (all instances 
> of a class or just specific ones) and revert the effects they caused 
> anytime needed.

I understand that these aspects are not actually limited for looking
at the system in various new ways but as well use it for new
implementation strategies.

After the roles/perspectives discussion in another thread I'm pleased to
see that we already have intersting tools available that are easy to use.
 
> I've updated a paper that describes AspectS in more detail: 
> http://www.prakinf.tu-ilmenau.de/~hirsch/Projects/Squeak/AspectS/Docs/AspectS_20020222.pdf

I read the paper although not yet thoroughly. It is a bit terse for
somebody not having followed the discussion on aspect oriented programming
in the last years. However for many readers it will be just to the point.

> At http://www.prakinf.tu-ilmenau.de/~hirsch/Projects/Squeak/AspectS/ 
> there are a change set and a pre-loaded image that might better explain 
> what I've tried to describe in the paper...

I can recommend anybody to look at the pre-loaded example image with the
example do-its.

> Best,
> -Robert


To sum up:
Danke schoen! (Thank you).  In particular that you kept updating it.
This is an excellent work!

Regards
Hannes Hirzel




More information about the Squeak-dev mailing list