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


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

Re: diamond operator

Date 2012-04-04 19:41 -0400
From Arne Vajhøj <arne@vajhoej.dk>
Newsgroups comp.lang.java.programmer
Subject Re: diamond operator
References <n4ann71plharl1ank5424uvqdi2ffpfh67@4ax.com> <4f7c2cb4$0$6901$e4fe514c@news2.news.xs4all.nl> <jlheg1$k86$2@dont-email.me>
Message-ID <4f7cdc3a$0$288$14726298@news.sunsite.dk> (permalink)
Organization SunSITE.dk - Supporting Open source

Show all headers | View raw


On 4/4/2012 8:23 AM, David Lamb wrote:
> On 04/04/2012 7:12 AM, Silvio Bierman wrote:
>> On 04/04/2012 03:54 AM, Roedy Green wrote:
>>> I was looking over the table of contents of a book about new features
>>> in Java 7 and came across a reference to the "diamond operator".
>> With some exaggeration one might call it Java's type inferencing...
>
> Well, maybe, but from the little I recall of my programming language
> design classes, "real" type inferencing is a lot more powerful, so I
> think you ought to have said "much exaggeration."

Give that the JLS says:

<quote>
If the type argument list to the class is empty — the diamond form "<>" 
— the type arguments of the class are inferred.
</quote>

then the usage of "type inference" can be defended.

But it is certainly not what type inference is in languages
like Scala etc..

Arne

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


Thread

diamond operator Roedy Green <see_website@mindprod.com.invalid> - 2012-04-03 18:54 -0700
  Re: diamond operator Arne Vajhøj <arne@vajhoej.dk> - 2012-04-03 22:06 -0400
  Re: diamond operator Silvio Bierman <silvio@moc.com> - 2012-04-04 13:12 +0200
    Re: diamond operator David Lamb <dalamb@cs.queensu.ca> - 2012-04-04 08:23 -0400
      Re: diamond operator Silvio Bierman <silvio@moc.com> - 2012-04-04 15:40 +0200
      Re: diamond operator Arne Vajhøj <arne@vajhoej.dk> - 2012-04-04 19:41 -0400
        Re: diamond operator David Lamb <dalamb@cs.queensu.ca> - 2012-04-05 08:03 -0400
  Re: diamond operator Jim Janney <jjanney@shell.xmission.com> - 2012-04-04 10:23 -0600
    Re: diamond operator Lew <lewbloch@gmail.com> - 2012-04-04 18:15 -0700
      Re: diamond operator David Lamb <dalamb@cs.queensu.ca> - 2012-04-05 15:44 -0400
        Re: diamond operator Jim Janney <jjanney@shell.xmission.com> - 2012-04-05 14:54 -0600
    Re: diamond operator Silvio Bierman <silvio@moc.com> - 2012-04-06 12:06 +0200
      Re: diamond operator Lew <lewbloch@gmail.com> - 2012-04-06 10:53 -0700
        Re: diamond operator Joshua Cranmer <Pidgeot18@verizon.invalid> - 2012-04-06 21:35 -0500
          Re: diamond operator Arne Vajhøj <arne@vajhoej.dk> - 2012-05-05 20:07 -0400
      Re: diamond operator Jim Janney <jjanney@shell.xmission.com> - 2012-04-06 19:56 -0600
        Re: diamond operator Jim Janney <jjanney@shell.xmission.com> - 2012-04-06 20:02 -0600
  Re: diamond operator Arivald <NOSPAMarivald@interia.pl> - 2012-04-05 10:11 +0200
    Re: diamond operator Lew <lewbloch@gmail.com> - 2012-04-05 11:34 -0700
      Re: diamond operator Arivald <NOSPAMarivald@interia.pl> - 2012-04-05 22:02 +0200
        Re: diamond operator ObeseeExpen <ObeseeExpen.5ibto0@no-mx.forums.yourdomain.com.au> - 2012-09-03 12:39 -0400
      Re: diamond operator Joshua Cranmer <Pidgeot18@verizon.invalid> - 2012-04-05 18:18 -0500
      Re: diamond operator Arne Vajhøj <arne@vajhoej.dk> - 2012-04-05 19:38 -0400
      Re: diamond operator Silvio Bierman <silvio@moc.com> - 2012-04-06 17:07 +0200
        Re: diamond operator Thufir <hawat.thufir@gmail.com> - 2012-04-06 08:51 -0700
          Re: diamond operator Silvio Bierman <silvio@moc.com> - 2012-04-08 15:12 +0200
    Re: diamond operator Arne Vajhøj <arne@vajhoej.dk> - 2012-04-05 19:41 -0400

csiph-web