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

Re: Aspect Oriented Programming in context of lightweight languages.

--- Matthew Estes <matt@maintree.com> wrote:
> 	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?

My lay-person view is that macros affect a local area
of source code (the area surrounded by the macro)
whilst aspects can affect distant areas of code.  One
could write aspect like macros but it wouldn't be
particularly convenient.  Aspects and staged
evaluation have something in common; I'm not sure what
as I'm not sure what the exact definition of an aspect
is; there probably isn't one as the field is quite new
and is essentially defining itself.

It's worth noting that macros can achieve more in a
language like Lisp than they can in Java.  This is
because value definition is more flexible in Lisp than
Java.  So, for example, when implementing a factory
pattern you have to define two classes (the product
and the factory).  In Java you'd usually have to
create two files for the definitions.  In Lisp /
Scheme you could wrap the definitions in a progn /
begin or use define-values to define the two objects
at once.


Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!