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


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

Re: Java vs C++

From Joshua Cranmer <Pidgeot18@verizon.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Java vs C++
Date 2011-02-06 22:06 -0500
Organization A noiseless patient Spider
Message-ID <iinnit$7vs$3@news.eternal-september.org> (permalink)
References (8 earlier) <iinara$2up$4@lust.ihug.co.nz> <4d4f43d9$0$23755$14726298@news.sunsite.dk> <iink6l$87t$1@lust.ihug.co.nz> <4d4f56ac$0$23758$14726298@news.sunsite.dk> <iinmra$9er$7@lust.ihug.co.nz>

Show all headers | View raw


On 02/06/2011 09:53 PM, Lawrence D'Oliveiro wrote:
> In message<4d4f56ac$0$23758$14726298@news.sunsite.dk>, Arne Vajhøj wrote:
>
>> As explained numerous times then Java generics and C++ templates
>> are somewhat different.
>
> The only differences arise from limitations of Java, nothing more.

That is not an assertion you can make. Java generics and C++ templates 
are different because their designers wanted them to be different. It 
would totally have been possible to implement C++ templates in Java--but 
the designers decided that was not what they wanted to do. I don't know 
what they would have done if they had added generics from the start, but 
given all of the issues seen with templates, I am willing to guess that 
it would still act nothing like templates do (i.e., as Java generics do 
know, just with fully reified types).

-- 
Beware of bugs in the above code; I have only proved it correct, not 
tried it. -- Donald E. Knuth

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


Thread

Re: Java vs C++ Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-07 15:08 +1300
  Re: Java vs C++ Arne Vajhøj <arne@vajhoej.dk> - 2011-02-06 21:19 -0500
    Re: Java vs C++ Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-02-09 01:07 +0800
    Re: Java vs C++ Arne Vajhøj <arne@vajhoej.dk> - 2011-02-07 19:44 -0500
    Re: Java vs C++ Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-07 15:53 +1300
      Re: Java vs C++ Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-02-08 10:25 +0000
        Re: Java vs C++ Lew <noone@lewscanon.com> - 2011-02-08 07:53 -0500
      Re: Java vs C++ Esmond Pitt <esmond.pitt@bigpond.com> - 2011-02-08 10:26 +1100
        Re: Java vs C++ Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-08 16:17 +1300
          Re: Java vs C++ Esmond Pitt <esmond.pitt@bigpond.com> - 2011-02-08 16:51 +1100
      Re: Java vs C++ Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-02-06 22:06 -0500
      Re: Java vs C++ "Mike Schilling" <mscottschilling@hotmail.com> - 2011-02-06 22:42 -0800
      Re: Java vs C++ Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-02-07 21:20 -0500
      Re: Java vs C++ Arne Vajhøj <arne@vajhoej.dk> - 2011-02-06 22:07 -0500
        Re: Java vs C++ Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-07 19:07 +1300

csiph-web