Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.linkpendium.com!news.linkpendium.com!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 generics and type erasure Followup-To: comp.lang.java.programmer Date: Thu, 26 May 2011 10:18:20 +1200 Organization: Geek Central Lines: 16 Message-ID: References: <9d4c2b16-beb5-40b1-87a2-f03e971efeed@k17g2000vbn.googlegroups.com> NNTP-Posting-Host: 118-92-95-178.dsl.dyn.ihug.co.nz Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Trace: lust.ihug.co.nz 1306361900 19424 118.92.95.178 (25 May 2011 22:18:20 GMT) X-Complaints-To: abuse@ihug.co.nz NNTP-Posting-Date: Wed, 25 May 2011 22:18:20 +0000 (UTC) User-Agent: KNode/4.4.7 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:4583 In message , Susan Calvin wrote: > The only reason I can think of for not doing this (the logic seems simple > enough to implement) is that it turned out doing so would break legacy > code that used util collections' raw types. Was that why? Yup. Much of the complexity attendant on introducing generics into Java was precisely because of that need for backward compatibility. > 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?