Path: csiph.com!eeepc.pasdenom.info!news.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!lust.ihug.co.nz!ihug.co.nz!not-for-mail From: Lawrence D'Oliveiro Newsgroups: comp.lang.java.programmer Subject: Re: Java vs C++ Followup-To: comp.lang.java.programmer Date: Mon, 07 Feb 2011 15:03:11 +1300 Organization: Geek Central Lines: 41 Message-ID: References: <4d4d585c$0$81476$e4fe514c@news.xs4all.nl> <4d4d60dc$0$23763$14726298@news.sunsite.dk> <4d4d8322$0$41117$e4fe514c@news.xs4all.nl> <4d4f042b$0$23753$14726298@news.sunsite.dk> <4d4f47bb$0$23760$14726298@news.sunsite.dk> NNTP-Posting-Host: 118-92-86-70.dsl.dyn.ihug.co.nz Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: lust.ihug.co.nz 1297044191 7779 118.92.86.70 (7 Feb 2011 02:03:11 GMT) X-Complaints-To: abuse@ihug.co.nz NNTP-Posting-Date: Mon, 7 Feb 2011 02:03:11 +0000 (UTC) User-Agent: KNode/4.4.7 Xref: csiph.com comp.lang.java.programmer:25717 In message <4d4f47bb$0$23760$14726298@news.sunsite.dk>, Arne Vajhøj wrote: > On 06-02-2011 18:24, Lawrence D'Oliveiro wrote: > >> In message<4d4f042b$0$23753$14726298@news.sunsite.dk>, Arne Vajhøj wrote: >> >>> On 05-02-2011 23:13, Lawrence D'Oliveiro wrote: >>> >>>> In message, Joshua Cranmer >>>> wrote: >>>> >>>>> On 02/05/2011 10:38 PM, Lawrence D'Oliveiro wrote: >>>>>> >>>>>> In message<4d4d8322$0$41117$e4fe514c@news.xs4all.nl>, Silvio wrote: >>>>>> >>>>>>> ... templates and gener[ic]s are completely different beasts. >>>>>> >>>>>> “Completely” as in “having nothing in common”? Or is this some usage >>>>>> of “completely” that I wasn’t aware of? >>>>>> >>>>>> Please explain. >>>>> >>>>> Templates in C++ are basically advanced macros--each invocation of a >>>>> template type regenerates the class, so a Foo and a Foo >>>>> are two completely different things. >>>> >>>> They are different things in Java as well. >>> >>> No. Same code. >> >> Same code in C++ too, then. > > No. > > C++ will generate two classes with two sets of code. > > (at least that is what common compilers do - I don't know if > the standard actually requires it to) See, it’s clear you’re hung up on specifics of particular implementations, not on how the language feature is defined at all.