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

Re: Aspect Oriented Programming in context of lightweight languages.



In a message dated 3/18/03 11:17:16 PM, matt@maintree.com writes:

>   In a Lightweight/Little Languages context, I was curious both for
>   examples of (specific) problems it solves, and whether it applies
>   to something besides a mostly procedural/OO language like
>   Java. For instance, how does AOP relate to Lisp? Does Lisp already
>   do it? How?

Sure.  Dave Tucker and I have a paper at his year's Aspect-Oriented
Software Development conference, taking place today through Friday,
showing to port some AOP concepts to Scheme, and implement them in
quite a lightweight way using PLT Scheme's features.  (A different
approach to this problem was presented by Doug Orleans last year.)
The conceptual part of the port (and the semantics underneath) apply
equally well to other languages with first-class procedural values,
which includes Python, etc.

I don't know whether Lisp "does" AOP.  There are certainly strong
connections between all of

- AOP
- metaclasses [Smalltalk, etc]
- reflection [lots of people]
- monads [the Haskell community]
- mixin layers [Batory]
- subject-oriented programming [Ossher, Tarr, Harrison, ...]
- aspectual components [Lieberherr]
- units and mixins [PLT]

but there are also significant differences.  Here's some prose from a
paper I just wrote, though this may be too short to actually shed much
light on the matter:

  Unfortunately, this process [of "aspect mining"] runs into
  shortcomings in modern aspect technology.  Some forms, such as
  AspectJ, are very good at performing an intrusive (i.e., without
  respect to modular boundaries and interfaces) but consistent change
  at many places in the program.  Other forms, such as mixin layers or
  HyperJ, are best at performing disparate changes but only at
  well-defined points.  The changes we identify are both intrusive and
  disparate.

The key to AOP that really separates it from the rest of the "aspects"
community is that it can perform very intrusive edits.  In some sense,
then, it's unfair to criticize it for its intrusiveness, because
that's exactly what separates it from the rest of the community.  The
understanding of "cross-cutting behavior" is, I think, not nearly as
novel, though the AOP folks have definitely done the best job of
anyone to articulate it.

Shriram