Recommended placement of type annotations
Michael Ernst
mernst at cs.washington.edu
Thu Feb 6 09:15:17 PST 2014
I agree with this suggestion. Thanks, Markus.
-Mike
> Subject: Recommended placement of type annotations
> From: Markus Keller <markus_keller at ch.ibm.com>
> To: type-annotations-spec-comments at openjdk.java.net
> Date: Thu, 6 Feb 2014 17:59:40 +0100
>
> java-se-8-jls-fr-diffs.pdf says in 9.7.4: "It is customary, though not
> required, to place annotations before all other modifiers."
> But that's not the tradition for type annotations.
>
> The java-annotation-design.html said: "It is strongly recommended that
> type annotations be written immediately before the type, after declaration
> annotations and modifiers."
>
> A more useful recommendation to alleviate the grammar problems is this:
> => "It is strongly recommended that declaration annotations be written
> before all other modifiers, and type annotations immediately before the
> type they apply to."
>
> Regard,
> Markus
More information about the type-annotations-spec-comments
mailing list