Java Annotations


I feel that a few rants are about to burst in me. Let me take this first; this is not a rant, though. Just a very large exclamation:

Java Annotations are NOT a way to implement DSLs, and will never be.

Java annotations are really nice, but seriously, they are NOT manna from heaven.


10 Comments, Comment or Ping

  1. Christian Seiler

    Who said that you can build DSLs with annotations?

    Anyway, annotations are one thing I’m definately missing in Ruby/Rails.

    Things like before_filter :login_required, :except=>[…] are just way too error-prone IMO. I’d like to declare this kind of stuff directly where it matters: At the methods.

    DSL or not, don’t know. This DSL thing is becoming too much of a buzz to me anyway..

    February 13th, 2008

  2. Avdi

    Sounds like some people are getting declarative programming (which annotations DO help with) and DSLs (which may or may not be declarative) confused.

    February 14th, 2008

  3. David R. MacIver

    The sociology of Java annotations is interesting. As far as I can tell the Java community basically went “Oh my god! Sun actually gave us AN INTERESTING FEATURE!!!!” and, as one, went mad with delight and decided that they had to use the damn things everywhere and for everything.

    February 14th, 2008

  4. Clinton Begin

    Gah! Java Annotations…

    They are easily as broken as Java Generics. Possibly worse. Horrible!

    I’ll wait for someone to ask before spilling my complete Java 5 rant all over your blog. :-)

    February 14th, 2008

  5. Anonymous

    Off topic: How is your Scala exploration going? It was a while ago you last mentioned it now…

    February 14th, 2008

  6. Anonymous

    Gah! Java Annotations…

    They are easily as broken as Java Generics. Possibly worse. Horrible!

    I’ll wait for someone to ask before spilling my complete Java 5 rant all over your blog. :-)

    Generics are horrible, but what’s wrong with annotations? And I’m also interested in the rest of your Java 5 rant, so consider yourself asked :-)

    February 14th, 2008

  7. Clinton Begin

    Anonymous… Click on my name to reach my profile and click the Not Coding blog… I posted a draft of my thoughts there. It’s too much to pollute Ola’s blog comments with.

    Cheers,
    Clinton

    February 15th, 2008

  8. Anonymous

    Thank you Clinton, very informative! You raise some interesting points that I wasn’t aware of before.
    I already had the impression that Java – the language, not the platform – is declining quality wise and reading rants like yours only reinforces that impression.

    February 16th, 2008

  9. Clinton Begin

    Sorry, Anonymous, I didn’t mean to leave you with no way to respond on my blog… :-) I posted an email address for feedback.

    Clinton

    February 16th, 2008

  10. Gordon DuQuesnay

    Recently I’ve been working with JBoss Seam. It uses annotations heavily. I’d really like to try using JRuby for some parts of the project, particularly testing (perhaps using jtestr) the part I can’t figure out though is how to handle all the annotations.

    April 7th, 2008

Reply to “Java Annotations”