Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
"Humane Pointcut Languages" [Was: Re: [aspectj-users] AW: Pointcut on a constructor with a custom @Annotation]

Ron Bodkin wrote:
Dean, I think you mean call( @MyAnnotation *.new(..) ) (or just
call(@MyAnnotation new(..))), since there's no return type for a
constructor.
...
Yes, I forgot about the extra "*" for the (invalid) return type that was in the expression. Need to get my glasses checked, I guess ;)

I've made mistakes like this occasionally in my own PC definitions (PCDs). The PCD language is very "dense" and requires careful inspection of any PC. Given a lot of recent discussion in the bloggosphere about "humane interfaces" (e.g., http://www.martinfowler.com/bliki/HumaneInterface.html), it would be interesting to consider a more verbose & humane PC language for AspectJ that could be used with the existing language. When you consider that a typical PCD, like most code, is written once and potential read many times, I would certainly use a more verbose language if it were available.

For example, Perl has more human-readable equivalents to its many cryptic "$..." variables. What if AspectJ's PC language had special symbols like the following:

$any_return       => "*" used for the return type
$any_arg           => "*" for any single method argument
$any_arglist       => ".."

etc.

Just a thought...

dean


Back to the top