Is AOP Metaprogramming?
First, let’s consider method declarations. Nearly 20 years ago, some programmers would look at a method declaration and read it as saying “Add an entry to the method table, with this name and this code body. This was a metaprogramming semantics for object-oriented programming. The method declaration was explicitly manipulating the method table. This was a natural way for early adopters to look at the technology, because they were concerned not only with what OO provided, but with the way it was implemented. But today, we read method declarations as saying “This is what happens when I call this method on this class of object. This is a direct semantics for objects. (To their credit, OO pioneers like Dahl, Nygaard and Kay almost always used a direct semantics when talking about OO.) Today, early adopters often discuss AOP using a metaprogramming semantics. For example, they may describe advice as meaning “Insert this code in all these places. The origin of AOP in reflection, combined wit