[Jsr308-statements] JSR-308 Statements document update (discussion items and grammar changes)

Trevor Harmon trevor at vocaro.com
Wed Apr 18 04:38:26 EDT 2007


On Apr 17, 2007, at 5:52 AM, Eugene Kuleshov wrote:

>  Option 2.
>
>  Alternative approach could be to only allow annotations on code  
> blocks. Then grammar change would be much smaller:
>
> Block:
>        [Annotations] { BlockStatements }
>
>  That would still allow to annotate loops but syntax would look  
> something like this:
>
>  for(Item i : items)
>  @LoopBound(max=100) {
>     ...
>  }

Faking statement annotations by putting blocks around everything is  
so awkward and error-prone that I hardly think there would be any  
gain at all. It wouldn't even be worth the effort of putting forth a  
specification, IMHO. Therefore, I am strongly in favor of Option 1.  
While it may make life more difficult for spec writers and  
implementors, it will pay off for users in the long run.

Trevor




More information about the JSR308-statements mailing list