As far as I can tell, if you have the following, you can pretty much do what AOP requires:
- CLOS- or Dylan-style generic function-based multi-methods
- reasonably capable macros, as in Lisp, Scheme, or Dylan
- function "advice", which exists in most Lisp implementations, but nothing else AFAICT
Sure, and if you have a language that can express the concept of “array of procedures” then you have all you need to do object-oriented programming.
Would you even need “advice” if all the functions (that you care about) are generic functions and you have CLOS-style method combinations? I.e. isn't advice just a sort of poor-man's method combination for functions that weren't originally defined as GFs?
Posted by jjwiseman at June 08, 2004 11:13 AM
What “advice” additionally provides is a new sort of “method combination” (or namespace) for the aspect you are adding. Even with full CLOS-style methods, you can run out of befores, afters, arounds, wrapper, whoppers, whoopie-cushions, and what-have-yous.