AspectL examples

Discussion of Common Lisp

AspectL examples

Postby smithzv » Wed Jul 23, 2008 12:30 pm

I have been looking at Pascal's stuff, namely AspectL, but I cannot seem to translate the documentation on AspectL's features into examples I see elsewhere for aspect oriented programming. For instance, on the Wikipedia page on aspect oriented programming, there is an example of writing a program that handles bank transactions where the crosscutting concerns would be things like determining if the user has access to this account, logging transactions, and updating information in a database.

Has anyone seen/can anyone provide examples like this implemented in AspectL?

Zach
smithzv
 
Posts: 94
Joined: Wed Jul 23, 2008 11:36 am

Re: AspectL examples

Postby costanza » Sun Jul 27, 2008 10:49 am

smithzv wrote:I have been looking at Pascal's stuff, namely AspectL, but I cannot seem to translate the documentation on AspectL's features into examples I see elsewhere for aspect oriented programming. For instance, on the Wikipedia page on aspect oriented programming, there is an example of writing a program that handles bank transactions where the crosscutting concerns would be things like determining if the user has access to this account, logging transactions, and updating information in a database.


That's not quite correct, there is actually no such example on the Wikipedia page, only a motivating example without a solution given in aspect-oriented style.

smithzv wrote:Has anyone seen/can anyone provide examples like this implemented in AspectL?


Consider AspectL deprecated. It was an interesting experiment to see how well AOP concepts translate to a language that already has powerful metaprogramming capabilities. However, it is actually not worth the trouble. The example on the Wikipedia could better be solved by a combination of a couple of (first-class) functions and a few macros.

Especially the notion of pointcuts doesn't translate well to Lisp, because of the so-called "fragile pointcut problem", which hits you much more severely than in a language like Java. Macros and MOP are better tools for dealing with what pointcuts are used for in, say, AspectJ.

Consider ContextL instead. That's a distillation of our experiences with AOP and AspectL, fits a language like Lisp much better and has means to deal with crosscutting concerns that are much more appropriate for a dynamic language.
costanza
 

Re: AspectL examples

Postby smithzv » Mon Jul 28, 2008 4:15 pm

Consider AspectL deprecated. It was an interesting experiment to see how well AOP concepts translate to a language that already has powerful metaprogramming capabilities.


I thought that might be the case.

Consider ContextL instead. That's a distillation of our experiences with AOP and AspectL, fits a language like Lisp much better and has means to deal with crosscutting concerns that are much more appropriate for a dynamic language.


I will, in fact I have to some degree, (Costanza and Hirschfeld 2005). I was just seeing what's out there. I came across Aspect oriented programming and I couldn't get my head around what exactly was involved in aspect weaving (and how one would implement it). It might be due to the paper or the Lisp like nature of the design, but the ContextL standpoint seemed fairly simple and intuitive.

Thanks for the reply,
Zach
smithzv
 
Posts: 94
Joined: Wed Jul 23, 2008 11:36 am


Return to Common Lisp

Who is online

Users browsing this forum: Exabot [Bot], Yahoo [Bot] and 3 guests