There are two important points of view on inclusion or subtype polymorphism in object-oriented programs, namely polymorphic access and dynamic dispatch. These features are essential for objectoriented programming, and it is worthwhile to consider whether they are supported in aspect-oriented programming (AOP). In AOP, pieces of crosscutting behavior are extracted from the base code and localized in aspects, losing as a result their polymorphic capabilities while introducing new and unexplored issues. In this paper, we explore what kinds of polymorphism AOP languages should support, using AspectJ as the basis for the presentation. The results are not exclusive to AspectJ—aspectual polymorphism may make aspects in any comparable AOSD language more expressive and reusable across programs, while preserving safety.
Erik Ernst, David H. Lorenz