Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!69.16.185.16.MISMATCH!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe01.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: 50 Message-ID: X-Complaints-To: abuse@newsgroups-download.com NNTP-Posting-Date: Sun, 03 Apr 2011 12:33:29 UTC Organization: Public Usenet Newsgroup Access Date: Sun, 03 Apr 2011 09:33:28 -0300 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:2802 On 11-04-02 10:12 AM, David Lamb wrote: > On 02/04/2011 8:50 AM, Arved Sandstrom wrote: >> 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,... > > I'm in the position of developing some of my own personal software, > which I'm organising under ca.queensu.cs.dal (the first 3 of which might > need to change depending on what my employer decides to say about it). > So I have ...dal.edfmwk for one particular set of tightly correlated > libraries, and ..dal.txt for a demo text editor, but I'd rather have > ...dal.something.specialized for all the various "grab bag" classes > rather than having a dozen ...dal.specialized direct descendants. Right > now "something" is util, and the only other thing I can think of to > replace it is equally generic: "lib". > > Do you have any suggestions? Let's make sure it's not really a package consisting entirely of utility classes, in which case calling the package "util" is sensible. Rare...but sensible. A utility class (which one could justify calling SomethingUtil[s]) generally has a bunch of static/class methods that do common tasks applicable to (or useful for) a wide variety of objects. You may genuinely have some classes in there that _are_ utility classes: if so, separating _those_ out into a "util" package is OK. Other people may use the name nonsensically, but you'll have it right. If it's a package containing a variety of non-utility classes that are simply difficult to classify at the moment, let's agree to agree that calling the enclosing package "util" is confusing and incorrect, since it implies that the classes _are_ utility classes. If it's in this state - a miscellany of classes - I'd be inclined to leave it as ...dal.specialized which you've noted you don't like (I believe we're assuming that "specialized" is actually a class name). I don't think there's anything inherently wrong with that; it actually expresses the inability to group them further correctly. 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