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


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

Re: Java vs C++

Path csiph.com!eeepc.pasdenom.info!news.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!proxad.net!feeder1-1.proxad.net!198.186.194.247.MISMATCH!news-out.readnews.com!transit3.readnews.com!nx02.iad01.newshosting.com!newshosting.com!216.196.98.146.MISMATCH!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.posted.palinacquisition!news.posted.palinacquisition.POSTED!not-for-mail
NNTP-Posting-Date Tue, 08 Feb 2011 11:07:12 -0600
Date Wed, 09 Feb 2011 01:07:12 +0800
From Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com>
User-Agent Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version 1.0
Newsgroups comp.lang.java.programmer
Subject Re: Java vs C++
References <iijbfr$pb2$1@lust.ihug.co.nz> <4d4d585c$0$81476$e4fe514c@news.xs4all.nl> <4d4d60dc$0$23763$14726298@news.sunsite.dk> <4d4d8322$0$41117$e4fe514c@news.xs4all.nl> <iil53i$q34$1@lust.ihug.co.nz> <iil5ed$10m$1@news.eternal-september.org> <iil74u$rac$1@lust.ihug.co.nz> <iil9uk$b6m$1@news.eternal-september.org> <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> <4d4f61fb$0$23756$14726298@news.sunsite.dk> <iio27n$g2f$2@lust.ihug.co.nz> <4d507f8a$0$32793$c30e37c6@exi-reader.telstra.net> <iiqcjh$qt4$5@lust.ihug.co.nz> <slrnil26hf.nej.avl@gamma.logic.tuwien.ac.at> <iirebq$9k4$1@news.albasani.net>
In-Reply-To <iirebq$9k4$1@news.albasani.net>
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
Message-ID <W5ydndPs8Y3d5czQnZ2dnUVZ_rgAAAAA@posted.palinacquisition> (permalink)
Lines 25
X-Usenet-Provider http://www.giganews.com
NNTP-Posting-Host 219.74.123.211
X-Trace sv3-AcR7ycKi904fo5UzOAzeQAdIZGdk5wiedXIbl8MwvSDHq5Nio64RHcLWkMrTIUso5GJhJmeLIQQYuks!Uy8CiytG4AQCNbt/9uN9KlVjGltP7ekDkctw/L1vLc9Tm+V/pVkGia/3O2WNSVB/GSk7iU2ARlIZ!SuDoI2bEtiUVDNB21URp0GalMYCD6H0PZ6CJnt5lGBMU
X-Complaints-To abuse@iinet.com
X-DMCA-Complaints-To abuse@iinet.com
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
X-Original-Bytes 3156
Xref csiph.com comp.lang.java.programmer:25545

Show key headers only | View raw


On 2/8/11 8:53 PM, Lew wrote:
> The problem with reifiable types is that it's too easy to do a
> half-assed job of your type analysis, thus resulting in the runtime
> errors to which Andreas alludes. Besides, all you need to do to get
> runtime typing is to include a runtime type token as a final member of
> your class and Bob's your uncle. Like so much else in Java, that just
> means you have to *think* and act for yourself, and type a few extra
> lines of code. Don't sprain your finger with that extra typing, whiners!

I agree that type erasure is not a huge liability in Java.  As long as 
you always use the generic type as a generic rather than raw type, 
compile time checking will do the job.

However, type erasure does limit what you can do via reflection, which 
is something very important at times.  Another advantage of reified 
types is the ability to use generics efficiently with value types, 
rather than having to box them.

Of course, Java doesn't have user-defined value types, but it would be 
potentially useful even for the built-in ones.

As in all cases, it's not _universally_ useful.  But they are worth 
having reified types, IMHO.

Pete

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


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