Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #2739

Re: java.lang vs java.util

From Arved Sandstrom <asandstrom3minus1@eastlink.ca>
Newsgroups comp.lang.java.programmer
Subject Re: java.lang vs java.util
References <in67lq$rgo$1@lust.ihug.co.nz> <gpedne5WCdgqOQvQnZ2dnUVZ_oWdnZ2d@earthlink.com> <in6dj8$jok$1@news.albasani.net>
Message-ID <tYElp.789$rB2.37@newsfe21.iad> (permalink)
Organization Public Usenet Newsgroup Access
Date 2011-04-02 09:50 -0300

Show all headers | View raw


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
>>> <http://developer.android.com/reference/java/lang/Iterable.html>
>>> depend on
>>> something defined in java.util
>>> <http://developer.android.com/reference/java/util/Iterator.html>.
>>>
>>> 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

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

java.lang vs java.util Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-04-02 17:11 +1300
  Re: java.lang vs java.util Patricia Shanahan <pats@acm.org> - 2011-04-01 21:23 -0700
    Re: java.lang vs java.util Lew <noone@lewscanon.com> - 2011-04-02 01:52 -0400
      Re: java.lang vs java.util Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-04-02 09:50 -0300
        Re: java.lang vs java.util David Lamb <dalamb@cs.queensu.ca> - 2011-04-02 09:12 -0400
          Re: java.lang vs java.util Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-04-03 12:37 +1200
            Re: java.lang vs java.util David Lamb <dalamb@cs.queensu.ca> - 2011-04-03 08:05 -0400
          Re: java.lang vs java.util Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-04-03 09:33 -0300
        Re: java.lang vs java.util "Mike Schilling" <mscottschilling@hotmail.com> - 2011-04-02 07:57 -0700
          Re: java.lang vs java.util Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-04-03 12:38 +1200
  Re: java.lang vs java.util Roedy Green <see_website@mindprod.com.invalid> - 2011-04-01 23:43 -0700
    Re: java.lang vs java.util Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-04-02 19:52 +1300
      Re: java.lang vs java.util David Lamb <dalamb@cs.queensu.ca> - 2011-04-03 08:05 -0400
        Re: java.lang vs java.util Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-04-04 10:11 +1200
          Re: java.lang vs java.util Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-04-03 19:25 -0300
            Re: java.lang vs java.util Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-04-04 12:49 +1200
              Re: java.lang vs java.util Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-04-03 22:50 -0300
                Re: java.lang vs java.util Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-04-04 16:05 +1200
                Re: java.lang vs java.util Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-04-04 07:06 -0300
                Re: java.lang vs java.util Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-04-04 23:10 +1200
                Re: java.lang vs java.util Leif Roar Moldskred <leifm@dimnakorr.com> - 2011-04-04 06:20 -0500
                Re: java.lang vs java.util rossum <rossum48@coldmail.com> - 2011-04-04 15:22 +0100
                Re: java.lang vs java.util Patricia Shanahan <pats@acm.org> - 2011-04-04 05:58 -0700
                Re: java.lang vs java.util Lew <noone@lewscanon.com> - 2011-04-06 15:34 -0400
                Re: java.lang vs java.util rossum <rossum48@coldmail.com> - 2011-04-07 10:22 +0100
                Re: java.lang vs java.util David Lamb <dalamb@cs.queensu.ca> - 2011-04-04 18:41 -0400
                Re: java.lang vs java.util Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-04-04 07:04 -0300
                Re: java.lang vs java.util Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-04-04 07:58 -0400
                Re: java.lang vs java.util David Lamb <dalamb@cs.queensu.ca> - 2011-04-04 18:46 -0400
  Re: java.lang vs java.util Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-04-02 16:22 -0400

csiph-web