Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!newsfeed.straub-nv.de!news.glorb.com!news2.glorb.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe21.iad.POSTED!8ad76e89!not-for-mail From: Arved Sandstrom User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: java.lang vs java.util References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Lines: 47 Message-ID: X-Complaints-To: abuse@newsgroups-download.com NNTP-Posting-Date: Sat, 02 Apr 2011 12:50:33 UTC Organization: Public Usenet Newsgroup Access Date: Sat, 02 Apr 2011 09:50:32 -0300 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:2739 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). I don't know if Patricia was actually _advocating_ such a move, but for the lion's share of classes and interfaces in java.util, any other package with a considered name is a better place to put them. There might be a half-dozen classes and interfaces that could stay in java.util...like just the "utilities" even. AHS -- That's not the recollection that I recall...All this information is certainly in the hands of the auditor and we certainly await his report to indicate what he deems has occurred. -- Halifax, Nova Scotia mayor Peter Kelly, who is currently deeply in the shit