Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Susan Calvin Newsgroups: comp.lang.java.programmer Subject: Re: Java generics and type erasure Date: Thu, 26 May 2011 04:18:46 +0000 (UTC) Organization: A noiseless patient Spider Lines: 25 Message-ID: References: <9d4c2b16-beb5-40b1-87a2-f03e971efeed@k17g2000vbn.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 26 May 2011 04:18:46 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="8GQpfR98UwRtBuI+o3WctQ"; logging-data="12361"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+0N/dkqdBKFCXjJp9qJp9T1khJ2g0mado=" User-Agent: slrn/3.1 (USERIX 1.7) Cancel-Lock: sha1:CX/Ha2FFt14HcL21y7kvTq45u1w= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:4592 On Thu, 26 May 2011 13:59:25 +1200, Lawrence D'Oliveiro wrote: > In message , Susan Calvin wrote: > >> On Thu, 26 May 2011 10:18:20 +1200, Lawrence D'Oliveiro wrote: >> >>> In message , Susan Calvin wrote: >>> >>>> Perhaps there should be a compile flag that turns on the >>>> legacy-compatible behavior for use when compiling 1.4 and older >>>> sources, but which is off by default? >>> >>> What happens when you mix code compiled with that flag, with code that >>> was compiled without? >> >> Why, nothing, of course, since generics don't exist at run-time. > > If theat were the case, then there would be no backward-compatibility > issue, would there? And the whole machinery of “raw” types could just > disappear in a puff of un-necessity. No -- presumably, it would have caused problems compiling 1.4 source code against 1.5's libraries, not running existing 1.4 bytecode linked to 1.5 libraries.