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


Groups > comp.lang.java.help > #2019

Re: Why so many imports instead of java.io.* ?

From Eric Sosman <esosman@ieee-dot-org.invalid>
Newsgroups comp.lang.java.help
Subject Re: Why so many imports instead of java.io.* ?
Date 2012-08-16 11:51 -0400
Organization A noiseless patient Spider
Message-ID <k0j4ul$bkp$1@dont-email.me> (permalink)
References <502a4326$0$295$14726298@news.sunsite.dk> <4772cee5-44de-4064-ac8c-389ce431b0ce@googlegroups.com> <502cf830$0$282$14726298@news.sunsite.dk>

Show all headers | View raw


On 8/16/2012 9:39 AM, Timothy Madden wrote:
>[...]
> After reading the links (one of wich is currently broken) I see that
> import lists are a work-around for a language-design problem...

     Not sure what "problem" you think they work around.  The
import directive is a convenience, nothing more: It allows you
to abbreviate java.io.BufferedReader as just BufferedReader,
but that's all.

     Off-hand, I can't think of a language that has namespaces
or namespace-like things that doesn't also have some way to
allow abbreviations of this kind.  If there is such a language,
I bet it's verbose.  Remember the Monty Python skit in which
an announcer speaks of the composer

	Johann Gambolputty de von Ausfern- schplenden- schlitter-
	crasscrenbon- fried- digger- dingle- dangle- dongle- dungle-
	burstein- von- knacker- thrasher- apple- banger- horowitz-
	ticolensic- grander- knotty- spelltinkle- grandlich-
	grumblemeyer- spelterwasser- kurstlich- himbleeisen-
	bahnwagen- gutenabend- bitte- ein- nürnburger- bratwustle-
	gerspurten- mitz- weimache- luber- hundsfut- gumberaber-
	shönedanker- kalbsfleisch- mittler- aucher von Hautkopft
	of Ulm

... and recites the entire thing at every mention?  Hey, Java
could have been like that!

-- 
Eric Sosman
esosman@ieee-dot-org.invalid

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


Thread

Why so many imports instead of java.io.* ? Timothy Madden <terminatorul@gmail.com> - 2012-08-14 15:23 +0300
  Re: Why so many imports instead of java.io.* ? Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-08-14 08:45 -0400
    Re: Why so many imports instead of java.io.* ? Patricia Shanahan <pats@acm.org> - 2012-08-14 06:16 -0700
      Re: Why so many imports instead of java.io.* ? Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-08-14 10:52 -0400
  Re: Why so many imports instead of java.io.* ? Jeff Higgins <jeff@invalid.invalid> - 2012-08-14 09:05 -0400
  Re: Why so many imports instead of java.io.* ? Lew <lewbloch@gmail.com> - 2012-08-14 16:31 -0700
    Re: Why so many imports instead of java.io.* ? Timothy Madden <terminatorul@gmail.com> - 2012-08-16 16:39 +0300
      Re: Why so many imports instead of java.io.* ? Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-08-16 11:51 -0400
        Re: Why so many imports instead of java.io.* ? Timothy Madden <terminatorul@gmail.com> - 2012-08-17 15:08 +0300
          Re: Why so many imports instead of java.io.* ? Lew <lewbloch@gmail.com> - 2012-08-17 11:26 -0700
            Re: Why so many imports instead of java.io.* ? Gene Wirchenko <genew@ocis.net> - 2012-08-17 12:53 -0700
              Re: Why so many imports instead of java.io.* ? Lew <lewbloch@gmail.com> - 2012-08-17 12:58 -0700
                Re: Why so many imports instead of java.io.* ? Gene Wirchenko <genew@ocis.net> - 2012-08-17 13:27 -0700
                Re: Why so many imports instead of java.io.* ? Timothy Madden <terminatorul@gmail.com> - 2012-08-20 19:09 +0300
                Re: Why so many imports instead of java.io.* ? Patricia Shanahan <pats@acm.org> - 2012-08-20 09:40 -0700
                Re: Why so many imports instead of java.io.* ? Timothy Madden <terminatorul@gmail.com> - 2012-08-21 15:03 +0300
                Re: Why so many imports instead of java.io.* ? Gene Wirchenko <genew@ocis.net> - 2012-08-21 09:05 -0700
                Re: Why so many imports instead of java.io.* ? Patricia Shanahan <pats@acm.org> - 2012-08-21 09:48 -0700
                Re: Why so many imports instead of java.io.* ? Lew <lewbloch@gmail.com> - 2012-08-21 11:51 -0700
                Re: Why so many imports instead of java.io.* ? Patricia Shanahan <pats@acm.org> - 2012-08-17 14:39 -0700
                Re: Why so many imports instead of java.io.* ? Lew <lewbloch@gmail.com> - 2012-08-17 15:39 -0700
                Re: Why so many imports instead of java.io.* ? Gene Wirchenko <genew@ocis.net> - 2012-08-17 15:57 -0700
                Re: Why so many imports instead of java.io.* ? Lew <noone@lewscanon.com> - 2012-08-18 11:03 -0700
                Re: Why so many imports instead of java.io.* ? Gene Wirchenko <genew@ocis.net> - 2012-08-19 18:07 -0700
  Re: Why so many imports instead of java.io.* ? Roedy Green <see_website@mindprod.com.invalid> - 2012-08-14 17:46 -0700

csiph-web