[JSR308] Postfix syntax for type annotations

Michael Ernst mernst at csail.mit.edu
Sun Feb 25 10:49:02 EST 2007


> > Actually, the draft proposal says that the meaning is *unambiguous* in
> > those cases.  (A previous version incorrectly stated that the syntax is
> > ambiguous.)
> I quote (emphasis mine):
> [snipped]

You are quoting from an old draft.  As my text indicated, the previous
version was not ideally worded.  Criticism of a non-current version is of
limited value.

> Here's what I find at the end of section 3.1:
> [snipped]

Again, you are reading an old version, not the current one, so you are in
the wrong section entirely.

> The spec currently takes the approach of
> specifying annotations for each context separately

An earlier version of the draft was unclear on this point.  The current one
is more straightforward:

  Our system uses a simple prefix syntax for type annotations: the
  annotation appears before the type, as in @NonNull String. There are two
  exceptions to this general rule: the syntax for arrays and the syntax for
  method receivers (see below).

  The following list gives examples of how annotations are written in the

Let's try to keep our discussions focused on the present.  It is
disappointing to waste breath on a stale version of the document,
particularly because I updated the draft on the website last night, before
the current flurry of messages, and notified this list of that update.  If
you don't want to reread the whole document, you can find a record of
changes to it at http://pag.csail.mit.edu/jsr308/changes.html.



More information about the JSR308 mailing list