[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [aspectj-dev] Named advice
|
> What do you think of having metadata tags on advice? It seems
> logical, and I assume it is possible to put metadata tags on
> anonymous classes so it's analogous to something in Java. It
> would also give a means of picking out advice elements.
I'm sure we'll support that syntactically. But I think it would
be kludgy to then use the tags for some semantic effect in AspectJ.
> Another possible use of named advice would be defining advice
> precedence within an aspect, rather than using ordering in
> the file. It would also facilitate tools support (so you can
> pick the advice to see in a browser and can see the name of
> the advice that affects something).
We considered the above. The former seems little to gain for a
new language feature. The latter wasn't language semantics, so
we didn't add names for it.
> I don't feel that having an optional name for advice will add
> much complexity. I can't suggest making it mandatory because
> of backward compatibility. I do grant you that we have to set
> a high bar to adding features to preserve simplicity.
No single addition adds much local complexity. But taken together,
all the features project both a real complexity and an "apparent
heft".
Its clear that one of the common arguments against AspectJ is that
it is "too big and complex". As you know, I think that argument is
somewhat bunk. We could and should address it by more clearly teaching
that AspectJ has a kernel, and then things like extra join points and
extra pointcuts are orthogonal. But that argument is out there, and
we need to keep it in mind.
> For that matter, if we were willing to make incompatible
> changes, I'd rename "after" advice to "after finally", so
> it's more clear instead of confusing novices...
For better AND for worse, we said a long time ago it was too
late to make that change. :)