Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #16331

Re: @Override

From Robert Klemme <shortcutter@googlemail.com>
Newsgroups comp.lang.java.programmer
Subject Re: @Override
Date 2012-07-25 07:57 +0200
Message-ID <a79g5cFvhnU1@mid.individual.net> (permalink)
References <75036e8b-8b5f-4ea4-aef7-c063249f5707@googlegroups.com> <500dce9e$0$6901$e4fe514c@news2.news.xs4all.nl> <a77mmkF9r3U1@mid.individual.net> <500f1018$0$6873$e4fe514c@news2.news.xs4all.nl>

Show all headers | View raw


On 24.07.2012 23:14, Silvio Bierman wrote:
> On 07/24/2012 03:36 PM, Robert Klemme wrote:
>> On 24.07.2012 00:22, Silvio Bierman wrote:
>>> Using an annotation is, as with
>>> almost all uses of annotations, a poor attempt at making up for the lack
>>> of a proper language feature.
>>
>> That is nonsense.  The mere fact that users can define their own
>> annotations along with handling these annotations demonstrates that
>> annotations solve problems which cannot be tackled by changing a
>> language's syntax.  Annotations add *arbitrary* meta data to language
>> constructs; if all these would have to be handled by a language change
>> you would need a new Java for every custom library which requires
>> additional meta data.

In all what you say below you do not address my argument.  I take that 
as agreement.

> Well, I already really dislike annotations for their use in frameworks
> like for example Hibernate or for all examples I have seen in "user code".

Do you have other arguments against annotations besides "dislike"? 
(Btw., many people actually like JPA over previous versions of EJB 
persistence just because lengthy XML files have been replaced by a few 
annotations.)  Do you at least concede that having the option to add 
user defined type safe meta data to language constructs is a totally new 
feature which allows to do things which cannot be done without?

> But to use it for plain language level constructs like @Override,
> @NotNull etc. is plain ugly. Why have keywords like final, public, etc.
> at all, then?

It may be ugly - but it may actually be the best solution considering 
all effects of language changes.  I did not think through all the 
effects of such a language change, did you?

> This way the language gets polluted using the generic annotation hammer.
> Leave it be or actually fix it! I would applaud a bold language revision
> that breaks backward compatibility for the benefit of fixing the
> language. I could even imagine an annotation that could hint the
> compiler at what language version a source is targeting.

I am glad that it's not you who decides about the further evolution of 
Java.  These dramatic changes all too often look like a good idea 
initially - and later turn out to be a nightmare when implemented 
without thoughtfully considering all effects of that change.

The term "software" creates the illusion that code can be changed at 
will.  But in reality changing code (especially when it's part of a 
public API) does have a cost - and it can be significant.  I suspect 
that this illusion is one of the reasons for so many project failures.

Cheers

	robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

@Override bob smith <bob@coolfone.comze.com> - 2012-07-23 11:30 -0700
  Re: @Override Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2012-07-23 20:52 +0200
  Re: @Override markspace <-@.> - 2012-07-23 11:54 -0700
    Re: @Override Lew <lewbloch@gmail.com> - 2012-07-23 13:05 -0700
    Re: @Override Arne Vajhøj <arne@vajhoej.dk> - 2012-07-23 19:54 -0400
  Re: @Override "John B. Matthews" <nospam@nospam.invalid> - 2012-07-23 15:56 -0400
    Re: @Override Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-07-23 14:19 -0700
      Re: @Override rossum <rossum48@coldmail.com> - 2012-07-24 13:09 +0100
        Re: @Override Arne Vajhøj <arne@vajhoej.dk> - 2012-07-24 21:29 -0400
      Re: @Override Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-07-24 09:04 -0400
  Re: @Override Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-07-23 16:35 -0400
    Re: @Override Lew <lewbloch@gmail.com> - 2012-07-23 13:59 -0700
      Re: @Override Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2012-07-23 23:40 +0200
        Re: @Override Lew <lewbloch@gmail.com> - 2012-07-23 14:51 -0700
          Re: @Override Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2012-07-24 00:08 +0200
            Re: @Override Lew <lewbloch@gmail.com> - 2012-07-23 16:57 -0700
      Re: @Override Robert Klemme <shortcutter@googlemail.com> - 2012-07-24 09:46 +0200
    Re: @Override Arne Vajhøj <arne@vajhoej.dk> - 2012-07-23 19:58 -0400
      Re: @Override Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-07-23 22:16 -0400
        Re: @Override Arne Vajhøj <arne@vajhoej.dk> - 2012-07-23 22:57 -0400
          Re: @Override Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-07-23 23:47 -0400
            Re: @Override Arne Vajhøj <arne@vajhoej.dk> - 2012-07-24 21:35 -0400
    Re: @Override Jim Janney <jjanney@shell.xmission.com> - 2012-07-26 20:00 -0600
  Re: @Override Gene Wirchenko <genew@ocis.net> - 2012-07-23 14:01 -0700
  Re: @Override Silvio Bierman <silvio@moc.com> - 2012-07-24 00:22 +0200
    Re: @Override Arne Vajhøj <arne@vajhoej.dk> - 2012-07-23 19:53 -0400
      Re: @Override Gene Wirchenko <genew@ocis.net> - 2012-07-23 18:59 -0700
      Re: @Override Silvio Bierman <silvio@moc.com> - 2012-07-24 22:57 +0200
        Re: @Override Arne Vajhøj <arne@vajhoej.dk> - 2012-07-24 21:24 -0400
    Re: @Override Robert Klemme <shortcutter@googlemail.com> - 2012-07-24 15:36 +0200
      Re: @Override Gene Wirchenko <genew@ocis.net> - 2012-07-24 09:54 -0700
      Re: @Override Silvio Bierman <silvio@moc.com> - 2012-07-24 23:14 +0200
        Re: @Override Robert Klemme <shortcutter@googlemail.com> - 2012-07-25 07:57 +0200
          Re: @Override Gene Wirchenko <genew@ocis.net> - 2012-07-25 10:34 -0700
          Re: @Override Arne Vajhøj <arne@vajhoej.dk> - 2012-07-25 14:54 -0400
            Re: @Override Wanja Gayk <brixomatic@yahoo.com> - 2012-07-30 14:42 +0200
      Re: @Override Arne Vajhøj <arne@vajhoej.dk> - 2012-07-24 21:20 -0400
        Re: @Override Lew <noone@lewscanon.com> - 2012-07-25 06:26 -0700
          Re: @Override Arne Vajhøj <arne@vajhoej.dk> - 2012-07-25 17:16 -0400
  Re: @Override Roedy Green <see_website@mindprod.com.invalid> - 2012-07-23 20:59 -0700
  Re: @Override Wanja Gayk <brixomatic@yahoo.com> - 2012-07-24 16:06 +0200

csiph-web