[JSR308] Can we agree on our goals?
Neal Gafter
gafter at google.com
Thu Feb 1 14:21:53 EST 2007
I think the right way to design a language with a general annotation
facility is to support (or at least consider supporting) a way of annotating
every semantically meaningful nonterminal. Doing that requires a language
design with a very simple syntax. Java isn't syntactically simple, and I
don't think there is anything we can do it make it so. If we wanted to take
this approach with Java we'd have to come up with a syntactic solution for
every construct that we want to be annotatable. Given the shape of the Java
grammar, that solution would probably be a different special case for every
thing we might want to annotate. From the programmer's point of view, I
believe the result would be a mess. It is hard for me to imagine that we
could get such a thing passed and included in Java.
It scares me that I see, in the draft spec and in the discussion here, the
group going down that slippery slope one language construct at a time. That
is way too complex to be practical. Part of the problem is that we don't
appear to have agreed upon our goals! I thought our goal is to support
annotations on types. That is a single (+-10) semantically meaningful
nonterminal in the language, and there is a simple, unambiguous, and uniform
syntactic solution that works for all types appearing in the sources. I'm
referring to the postfix "annotation after the type" solution. We know this
doesn't satisfy every requirement in the world, but no specification will.
Simple is good, and it feels to me like most of the proposals more complex
than this are actually trying to expand the scope of our charter.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.csail.mit.edu/pipermail/jsr308/attachments/20070201/3167367c/attachment.html
More information about the JSR308
mailing list