Friday, April 29, 2005

Aspect-Oriented Programming Considered as Harmful as GOTO

Reading yesterday news I remained rather shocked to find this link to a Forrester research

From the article: Aspect-oriented programming (AOP) is intended to address common problems that object-oriented programming (OOP) doesn't address well, plus some problems that OOP itself created. However, AOP is a risky solution: It is a very generic mechanism for solving some very specific concerns and has been likened to a kind of "GOTO" statement for OOP. Like GOTO, it can cause more harm than good.

The research seems based on two papers from the University of Passau:

Dijkstra in his letter observed: " ... that the quality of programers is indirectly proportional to the amount of Go To statemets they use in their programs.". As currently most AOP research is not about methodolgy but about more dynamicity in the future this might be rephrased to " ... indirectly proportional to the amount of advice they use in their programs.

Aspect oriented programming has been proposed as a way to improve modularity of software systems by allowing encapsulation of cross-cutting concerns. To do so, aspects specify where new functionality should apply using pointcuts. Unfortunately todays mainstream aspect oriented languages suffer from pointcut languages where pointcut declarations result in a high coupling between aspect and base system. Additionally, these pointcuts are fragile, as non-local changes easily may break pointcut semantics. These properties are a major obstacle for program evolution of aspect oriented software. This paper introduces a pointcut delta analysis to deal with this problem.

This research has been widley commented on aosd-discuss.