[JSR308] annotation for wildcard types

Neal Gafter gafter at google.com
Fri Feb 2 18:00:39 EST 2007

On 2/2/07, Chin Wei Ngan <chinwn at comp.nus.edu.sg> wrote:>

> > They are variance annotations, but not in the sense of JSR175
> annotations.
> > The variance/wildcard syntax affects the type system and static
> semantics of
> > the language, which is something that annotations simply do not do.
> Yes, I agree with what you said. There is no point in
> providing an annotation for a feature that is already in the language.

That's not what I said. Whether or not variance is already in the language,
annotations in the sense of JSR175 would have been a totally inappropriate
way to add variance to the language's type system.

Having said that, my own understanding of JSR175 annotations is that
> they can be used either statically at compile-time and/or
> dynamically at runtime. Is this the general understanding?

So far I can agree.

If so, I can imagine it being used to help design the
> more advanced type systems or static analysers that typically
> require annotations. At least, this is the angle I am coming from.

If your understanding is that annotations can affect any other aspect of the
program's static semantics (such as the type system) then your understanding
is not correct. The kinds of 'advanced type systems' you're talking about
are extralinguistic: they're not described by the language spec and
generally processed by tools outside the compiler.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.csail.mit.edu/pipermail/jsr308/attachments/20070202/0541a9a8/attachment.htm

More information about the JSR308 mailing list