Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Language: support for modifiers in TypePatterns

...
> 
> Let me clarify this.  isInterface() is not a PCD.  It is a new special form
> of TypePattern.  
Sorry for the incorrect statement - it clearly isn't a PCD. While at first their similarity to a PCD seemed like an advantage to me, I actually think would be both confusing and it looks more awkward in practice. 

> ... I'm troubled by the fact that it uses () where nothing will ever
> be allowed to sit between those parens.  This seems like a small abuse >of the function-call syntax style.
Agreed. (Well, you can imagine even more convoluted forms where there would be arguments in there. But that's not something anyone is advocating)

On further consideration, I much prefer the use of the modifiers in the sets style: interface, class, aspect, inner, anonymous

It's consistent with existing AspectJ use. It doesn't lead to ugly syntax. It isn't surprising (like attributes on code you don't control) or misleading (like a function-style special form for type pattern). It avoids increasing the learning curve. And naming conventions for Java (and AspectJ) mean that almost nobody will have types with these names.

Ron


Back to the top