[aosd-discuss] non-intrusive modification of existing code
christopher diggins
cdiggins at users.sourceforge.net
Fri Feb 27 09:00:28 EST 2004
It has been mentioned to me on several occasions that a key principle of AOP
is the non-intrusive modification of existing code. This has been referred
to as the obliviousness principle.
If we do not have this principle, then what are we left with? Is it not also
AOP? When we support the separate declaration of crosscutting concerns and
pointcuts, from a binding of these crosscutting concerns to a target class.
It would seem then that there are two separate and valid approaches :
1) crosscutting => type overwriting (i.e. AspectJ)
2) crosscutting => type creation (i.e. C++ crosscut macro)
The only "key principle" I see as a software developer to AOP is the ability
to easily express object oriented designs that do not have interleaved
concerns.
The oblivious principle is obviously powerful. It allows for a class of
designs to be expressed in a very compact manner. There is a downside to
this, as there is to any increase of expressiveness in a language. For
instance it becomes very easy for programmers to introduce side effects into
code which occur across module boundaries. Essentially the advantages of
encapsulation are thrown out the window. This will likely prove to be a
significant hindrance to medium to large scale application of type
overwriting AOP systems.
I put forth that the obliviousness principle is not a key principle of AOP
but rather a secondary principle. We could characterize it as perhaps a key
part of type overwriting AOP systems.
Christopher Diggins
yet another language designer
http://www.heron-language.com
More information about the discuss
mailing list