The blogsphere was a buzz recently on what JSR-308 will represent for the Java platform, the former of which is a specification set to increase the functionality of annotations in Java.
Entitled 'When Should You Jump (Java)? JSR 308. That's When.', this post takes a rather dire outlook on JSR-308 intention's:
JSR 308 aims to bring Java a more precise type system, and to make the type system arbitrarily extensible. I'll admit that I had no idea what that meant, either. Fortunately, presenter and MIT Associate Professor Michael Ernst gave us several examples to consider.
The expert group sees two problems that need to be addressed.
The first problem is a syntactic limitation with annotations today: they can only be applied to type declarations. So, for example, we can say:
@NonNull List strings;
If the right annotation processor is loaded, this tells the compiler that strings will never be null. The compiler can then help us enforce that by warning on any assignment that could result in strings taking on a null value.
Today, however, we cannot say:
@NonNull List<@NonNull String> strings;
This would mean that the variable strings will never take a null value, and that no list element it contains will be null.
Read the complete post 'When Should You Jump (Java)? JSR 308. That's When.'
Other posts from around the blogsphere include:
Read 'JSR-308 Animosity'
Read 'What Hath Java Wrought'