[JSR308] Can we agree on our goals?
eu at javatx.org
Fri Feb 2 21:55:26 EST 2007
Hani Suleiman wrote:
>> By the way, Hani, you have voted yes for the JSR 308. Have you
>> changed your mind since then?
> Of course not! Being concerned is *healthy*, throwing ones hands up
> and giving up (so early in the game too) is not. Specifically:
> - Pushing the problem of readability on tooling is not a good
> solution. Sure, IDE's might help, but source files are plaintext ,and
> should be editable and easy to understand as such. So any syntax
> constructs we come up with should take that into consideration. A
> source file that is mostly annotations where the actual code is hard
> to find is a bad thing for Java. Surely we can all agree on that?
I can't agree with that.
Currently it is quite possible (and in fact, many developers do that)
to document code using huge comments, including class and method
javadocs, as well as block and line comments even inside method body.
Does it make code hard to find? Probably yes. Does it help user to read
the code? Probably yes. Strangely, no one think that those comments do
clutter source code. On the other hand, those comments does not help
tools to read very same code (unless those tools are using artificial
comment structurization, like we have seen in XDoclet or JML).
Also, it is been mentioned in the discussion, those new annotations
won't appear in every source file. They COULD appear in some code and it
is up to the developers to use their common sense and the best practices
to apply these annotations where it is appropriate. But it is also
understood that language designer can't count on the language user
> - Based on the above, restricting where annotations can be places is
> worth discussing (as we are). I'm on the fence right now with regards
> to allowing it on code blocks. I can see the benefits, but worry about
> the clutter. It's even debatable whether it should be allowed on
> loops, given that forcing a block onto a loop to annotate it seems
> somewhat awkward.
I find it at least strange from the language point of view to allow
annotations only on and not on all constructs that allows blocks. Can we
all agree that is should be either all blocks or none and focus further
discussion on how we can address raised issues and/or keep code readable?
More information about the JSR308