John Lam 1997 — 2026

Another one bites the dust

I see that Clemens Vasters has also soured on AOP. The primary weakness of the AOP approach is due to the difficulty of writing stateful aspects that are composable. In his piece, Clemens calls stateful aspects “opaque aspects” and stateless aspects “passive aspects”. While he describes a bunch of nasty technical issues that got in the way of having a clean implementation, the composability problem will nevertheless limit the utility of AOP.

The only point that I disagree with in his article is how he characterizes AspectJ pointcuts as equivalent to the use of attributes in the CLR. AspectJ pointcuts are an example of a “push” mechanism for weaving aspects, whereas attributes are an example of a “pull” mechanism for weaving aspects. In AspectJ, you don’t need to touch the source code to weave an aspect into a particular join point, whereas with attributes you do need to touch the source code to achieve the same effect.