3 ms·
What is the point of this article? To vent about how much they dislike Java? It's clearly not to educate, as the least they could do is try researching how to d
by mmastrac 12y ago
What is the point of this article? To vent about how much they dislike Java? It's clearly not to educate, as the least they could do is try researching how to do repeating annotations in JDK 8:
http://softwarecave.org/2014/05/20/repeating-annotations-in-java-8/ http://softwarecave.org/2014/05/20/repeating-annotations-in-...
And it's clear from reading the annotation documentation that null is not a valid value. It might be surprising to some developers, but it was a conscious decision made by the spec designers. It also shouldn't be a surprise to the author that Java is smart enough to forbid you to set a null value regardless of whether it was specified directly or they used a constant:
http://stackoverflow.com/questions/1178104/error-setting-a-default-null-value-for-an-annotations-field http://stackoverflow.com/questions/1178104/error-setting-a-d...
"I hate X" piece like this do nothing to advance the discussion on language features. They only add a bunch of noise and ramp up the flamewars on both sides.
- toddsiegel 12y agoAgreed. I am impressed by OP's energy to even create such a site and go into so much detail, but put it to better use.
- jkrems 12y agoThe article was published 5 days before the release of Java 8 - at least if my quick googling was correct. That might explain why it doesn't mention repeating annotations as a solution.
- icebraining 12y agoBut the feature was in the pipeline for Java 8 since 2011[1], and there were multiple blog posts since then, like [2] and [3]. [1] http://openjdk.java.net/jeps/120 http://openjdk.java.net/jeps/120 [2] http://blog.functr.com/2012/09/java-8-features-discover-repeating.html http://blog.functr.com/2012/09/java-8-features-discover-repe... [3] http://java.dzone.com/articles/subtle-changes-java-8 http://java.dzone.com/articles/subtle-changes-java-8