Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "Mike Schilling" Newsgroups: comp.lang.java.programmer Subject: Re: java.lang vs java.util Date: Sat, 2 Apr 2011 07:57:33 -0700 Organization: A noiseless patient Spider Lines: 1 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=original Content-Transfer-Encoding: 7bit Injection-Date: Sat, 2 Apr 2011 14:57:05 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="nPgGKe3051Y3NHz75zStxg"; logging-data="831"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+frNRGDnJhN+iwa4axBpHkGSubwwSeXxQ=" X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416 In-Reply-To: X-Newsreader: Microsoft Windows Live Mail 14.0.8117.416 Importance: Normal Cancel-Lock: sha1:hhQzIvKzDL1uqMG09ewhl8v+jiQ= X-Priority: 3 X-MSMail-Priority: Normal Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:2755 "Arved Sandstrom" wrote in message news:tYElp.789$rB2.37@newsfe21.iad... > On 11-04-02 02:52 AM, Lew wrote: >> On 04/02/2011 12:23 AM, Patricia Shanahan wrote: >>> On 4/1/2011 9:11 PM, Lawrence D'Oliveiro wrote: >>>> Surprising to see something defined in java.lang >>>> >>>> depend on >>>> something defined in java.util >>>> . >>>> >>>> Surely the hierarchy should go the other way? >> >> Not if it wants to be consistent with >> http://download.oracle.com/javase/6/docs/api/ >> don't'cha think? >> >> And the so-called "hierarchy" of java.util and java.lang is that they >> are equal. The language reserves for itself the entire panoply of >> java.* and javax.* packages. >> >>> I think Iterable may make it into java.lang because of its significance >>> in the foreach statement. >> >> That seems to go against Java's history of conservatism with respect to >> backward compatibility. And why should it? java.lang and java.util are >> equal. The language reserves for itself the entire panoply of java.* >> and javax.* packages. >> > java.util from Day One has simply been a grab-bag package. The name > "util" already says "we didn't know where else to put it". It's a bad > example and a bad naming choice which has led to innumerable copycats in > the form of not only third-party org.foo.util packages, but the > inevitable follow-on, FooUtils classes (which are almost invariably > grab-bag classes). Collections certainly deserve their own package. And arrays should implement List, as they do in .NET. (Arrays of objects, anyway -- there are obvious issues with arrays of primitives.)