Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] parameter evaluation and advice

This issue isn't about the language being dynamic or having
dynamic scope. As Wes says, its about whether argument evaluation
joinpoints are part of the language. (Or about whether around
advice is macro- rather than function-like.)

I doubt that argument evaluation join points could be useful,
except perhaps in some debugging aspects. We avoided any join
points that weren't useful for real programming.

The problem is that if someone makes what appears to be a
small change to the program, advice defined on argument
evaluation join points will change.

If I have:

  foo(a + b);

and I change it to:

  int s = a + b;
  foo(s);

then the argument evaluation join point just sees the
evaluation of 's', not 'a + b'.




> -----Original Message-----
> From: aspectj-users-admin@xxxxxxxxxxx 
> [mailto:aspectj-users-admin@xxxxxxxxxxx] On Behalf Of Lendvai Attila
> Sent: Thursday, November 06, 2003 8:35 AM
> To: aspectj-users@xxxxxxxxxxx
> Subject: RE: [aspectj-users] parameter evaluation and advice
> 
> 
> :: Hi -
> :: 
> :: > to do this you need a fully dynamic system with proper 
> :: macro support
> :: 
> :: I'm not sure that's true.  In AOP, you'd just need a join 
> :: point that included the parameter evaluation.  This would be 
> :: possible in a source-based implementation, but it would be 
> :: hard in bytecode to recognize the affected code.  Similar 
> :: considerations go into supporting a join point for something 
> :: like this:
> :: 
> ::      field = (Something) else();
> :: 
> :: where you'd like to grab the assignment, cast, and method-call.
> 
> my expression was wrong. you can do it in a dynamic 
> language... i had no
> doubt the aspectj team can do it. my little concern with AOP 
> is that the
> tools provided by AOP are not first class objects in the system
> available for extension. for example i can not change the behaviour of
> pointcuts in one of my projects... (silly example)
> 
> the way i would love AOP is a utility library in a dynamic language.
> don't misunderstand me, aspectj is very helpful for me, and i use it
> every day. but if i had a choice i would not use java at all.
> 
> :: The question is whether these are useful and principled join 
> :: points. I'd be interested in a definition of "principled", 
> :: but it at least includes the following properties:
> :: 
> :: - a unit the average programmer recognizes
> :: - easily and meaningfully addressable by pointcut designators
> :: - implementable: different implementation strategies
> ::    can detect and close over the join point with
> ::    reasonable effort
> :: 
> :: E.g., a possible join point not in AspectJ 1.1 is for "throws".
> :: 
> :: While AOP has roots in dynamic languages, it has really come 
> :: alive in Java because AspectJ can encapsulate crosscutting 
> :: concerns without introducing the complexity and 
> :: indeterminacy of dynamic languages or generative approaches.
> 
> and it's a very good thing what aspectj seems to achive! i just never
> liked the barriers that exist only due to "average 
> programmers". you can
> not prevent anyone writing bad code...
> 
> </rant>
> 
> sorry, it's completly offtopic,
> 
> 101
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users
> 




Back to the top