Annotations for language features
Artur Biesiadowski
abies at adres.pl
Sun Aug 16 01:03:16 PDT 2009
Reinier Zwitserloot wrote:
> http://projectlombok.org/ is a prototype that lets you play around
> with what happens when you use annotations for language features.
>
> So far, the sky has not fallen down. On the contrary; they are
> namespaced and serve as document pointers, so they've been quite nice.
>
For me, rule of thumb is: if you remove all properties from the source
code (everywhere, libraries and user code), code should still compile.
It can fail only on runtime and only because somebody is explicitly
using reflection to retrieve annotations. So far, all official
annotations and all proposed ones follow this rule. Even JSR 308 is the
same - type annotations are optional, meaning that if you would remove
them from std lib and your code, everything would compile properly.
Project lombok is interesting hack, but I would never, ever like to see
it happening to official java. Next step and we will end up Borland
Pascal way and put control instructions in comments/javadoc.
With best regards,
Artur Biesiadowski
More information about the coin-dev
mailing list