AOP in Clojure

304 views
Skip to first unread message

Nebojsa Stricevic

unread,
Feb 2, 2011, 8:09:36 AM2/2/11
to Clojure
Hi,

Are there any general purpose libraries/frameworks with nice API/DSL
for Aspect Oriented Programming for Clojure? Or is there someone
working on it? Is it needed? Possible?

Cheers,

Shantanu Kumar

unread,
Feb 2, 2011, 8:41:24 AM2/2/11
to Clojure
I think what a Ring middleware[1] does might be very close what you
want to do with AOP. Clojure has a natural way to "decorate" an
existing body of code using higher order functions and macros.

[1] http://github.com/mmcgrana/ring

Could you share some use cases that you want to achieve with AOP?

Regards,
Shantanu

On Feb 2, 6:09 pm, Nebojsa Stricevic <nebojsa.strice...@gmail.com>
wrote:

Saul Hazledine

unread,
Feb 2, 2011, 8:51:21 AM2/2/11
to Clojure
On Feb 2, 2:09 pm, Nebojsa Stricevic <nebojsa.strice...@gmail.com>
wrote:
I agree with Shantanu and feel that Ring is a nice example of AOP
behaviour using functions. For a general purpose library you may find
Robert Hooke useful:

https://github.com/technomancy/robert-hooke

Saul

Nebojsa Stricevic

unread,
Feb 2, 2011, 4:01:16 PM2/2/11
to Clojure
Thanks for these answers. I forgot about Robert Hooke, although I've
seen it already. I don't have a real use case yet. I'm researching
Domain Specific Languages composition/combining, so AOP could be
useful. I've checked some Clojure tracing code, I'll dig into Ring
more and Robert Hooke looks very useful.

Greets,

--
Nebojša Stričević
Reply all
Reply to author
Forward
0 new messages