May 16, 2008

Perplexion

Mathias is perplexed at the animosity against JSR 308 – he says (paraphrased):

  • As for generics, I gladly trade in the more complicated syntax for better static typing.

and

  •  That’s not the case at all with annotations. If you like you can easily ignore the entire idea.

speaking only for myself, I’ll respond with:

  • If one doesn’t like static typing to begin with, the fact that generics make it “better” is not a benefit

and

  • In theory, one can ignore the entire idea.  In practice, as a developer out in the field, even if I scrupulously avoid them in my own code, it will be inevitable that over time:
    • Someone (Person A) will want to show how smart they are by implementing all sorts of too-clever-by-half annotations in their open source project or commercial project
    • Someone else (Person B) will want to show off how smart they are, by trying to create annotations that are twice as clever as Person A’s
    • Some third person (Person C), not knowing any better, or thinking they’re even smarter, will make a total mess of everything, creating bizzare new structures.
    • Lastly, I will be called in to help figure out how to fix/refactor/automate testing of this code, and it will be a complete nightmare.

This is a classic and commonplace event in software – for various reasons, a wide swath of programmers are both very smart, and fairly OCD (Obsessive-Compulsive).   They learn a new technology, and obsessively abuse it, attempting to find ways to use it for every possible problem (see Maven2).   They’re not bad people, they’re just focused on using cutting-edge technology to solve problems, and become the proverbial man with a hammer who sees nails everywhere…

And so the likely result of JSR 308 is that we will end up with open source projects that are littered with cryptic and broken annotations that will be zealously guarded and protected by the chosen few, who see nothing wrong with adding  incredibly convoluted new constructs to their program – after all, the code isn’t convoluted to them.   If mere mortals such as I struggle with comprehension, it just demonstrates how superior they are to me, no?

Groovy looks more attractive every day.