[aosd-discuss] "AOP considered harmful"
Owen Corpening
ocorpening at acornsys.com
Tue Apr 26 09:19:28 EST 2005
Logging the entry/exit/exceptions in "every" method is simple also, but I
find strength in getting the output without seeing the code, especially
since it basically never "fails". It is just clutter to me.
Perhaps echoing the args/return values could lead to some debugging,
perhaps.
I think getting the code you want instrumented, and the code you don't want
instrumented excluded is the key, but still I find it inarguable that AOP is
totally appropriate for this cause (although as has been stated improvement
is always possible). Inheritance would be tough to implement all the
"exclude" type functionality (if you made Object constructor/destructor do
logging somehow, you would have to get the getter/setters excluded for
example, as well as the std libs which you would not want logging).
I think much attention has been paid to the more esoteric applications of
AOP and to me logging alone is sufficient to make it a Godsend.
Thanks,
Owen Corpening
Acorn Systems
-----Original Message-----
From: discuss-bounces at aosd.net [mailto:discuss-bounces at aosd.net] On Behalf
Of Rickard Öberg
Sent: Tuesday, April 26, 2005 7:04 AM
To: discuss at aosd.net
Subject: Re: [aosd-discuss] "AOP considered harmful"
Mira Mezini wrote:
> First to the point of "being good enough to expand the predicates in your
> mind at any time". Why would you want to expand, at all? The point is
that
> the predicates are first-class abstractions / means of referencing,
words in
> your language. Did you ever want to expand a while-loop down to the jump
> structure needed to implement looping? I doubt... to use Gregor's wording
> from one of his talks you probably "say *while* when you mean it!".
Or, do
> you try to expand down to the method dispatch and interpretation of
> statements in the method body in the context of the receiver object
any time
> you see a method call?
As long as the system is working: no. If the system isn't behaving the
way I thought my abstractions would make it behave: yes. If a "while"
loop isn't doing what I thought I told it to do, then yes, I will have
to mentally expand it to figure out what I did wrong. For "while" loops
that is usually doable, but for pointcuts which can be pretty abstract
it is an inhuman task to debug mentally.
> The point I am trying to make is, once you build abstractions, you
look at
> them as being elementary units for the next level of complexity.
As above. If the abstraction works: yes. If the abstraction doesn't work
(i.e. doesn't do what you thought it should do): no.
> I do strongly question this, because it is somehow implying that AOP is
> making things more complex.
AOP is making some things more complex and some things less complex.
Solution: use tools to make the more complex things less complex, so
that all things are less complex. Problem solved :-)
/Rickard
__________________________________________________
AOSD Discuss mailing list - discuss at aosd.net
To unsubscribe go to http://aosd.net
More information about the discuss
mailing list