[aosd-discuss] Scope of AOP..

Marc Eaddy eaddy at cs.columbia.edu
Thu Apr 6 15:11:30 EST 2006


Hi Pascal,

	You have some great points.  I respond below:

> 
> I would expect that modern runtime environments indeed 
> optimize such function calls away.
> 
> In Java, I suspect that the logging method is roughly 
> implemented like this:
> 
> static boolean loggingEnabled = true;
> 
> public void log(String msg) {
>    if (loggingEnabled) {
>      System.out.println(msg);
>    }
> }
> 

I assume the implemention above is not using AOP.  In that case, you'll end
up with some concerns, e.g., logging, being implemented using OOP and some
with AOP, e.g., tracing.  Since both concerns are crosscutting, I'd like to
use the same uniform AOP implementation for both.  For example, I may want
logging and tracing to both be disabled using the same flag, or I may want
them to send messages to the same destination.  Statement Annotations
unifies homogeneous (tracing) and heterogeneous (logging) concerns because
it allows both concerns to be implemented using the same unified AOP
solution.

> 
> With macros, you can achieve a similar effect. Here is a 
> similar macro in Common Lisp...
> 

My argument is the same.  I'd like a unified solution for both logging and
tracing, not one that uses macros and one that uses AOP.  I'm not a
Lisp/Scheme expert, so please correct me if it is possible to
implement/modularize all crosscutting concerns using macros.

In any case, I'm still trying to determine if using statement annotations
for fine-grained advising applies to other programming languages and AOP
languages.  Currently, my arguments are directed towards AspectJ-like
languages applied to Java/C#/C++/etc., where the AOP language does not
provide a simple and robust way to quanitfy all the JPs we are interested
in.




More information about the discuss mailing list