Richard Smol wrote:

> I have a hunch that AOP would indeed be very handy for a project like
> JOS.

The idea of aspects cutting across classes is interesting but the
current design of AspectJ seems to be limited in what places you can cut
through a class. Here are the defined entry points:

before
after
catch
finally

Suppose you had a method that calls super.method() on its last line. You
may wish for an aspect to cut through just above where it calls
super.method(). Also, I could imagine the need to be able to cut through
at any point in a method. For example, a debug aspect may wish to insert
a debug message inside an if block. This could be implemented in AspectJ
by allowing markers to be inserted in the code that can be targeted by
an aspect. There could be more elegant ways.

<brain.dump>
hmm.. I wonder whether the idea of aspects can be generalised even
further than the basic object + aspects idea. Maybe a class can be
defined in terms of a number of intersecting aspects...
</brain.dump>

> The thing is though that you need an Aspect Weaver (sort of like a
> specialized compiler). I don't know of any GPL'ed ones.

It would not be too difficult to implement one since its main task is
copying lines of code from the Aspect into intersected classes.

If I ever switched to using something like AspectJ, I would also want
other language features in addition such as genericity and pre/post
conditions. If someone wants to work on a (pre)compiler for an Aspect
oriented language, they might want to consider adding these.

-- 
Ryan Heise

http://www.progsoc.uts.edu.au/~rheise/

_______________________________________________
General maillist  -  [EMAIL PROTECTED]
http://jos.org/mailman/listinfo/general

Reply via email to