commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Cooper <mart...@apache.org>
Subject Re: import * vs explicit debate
Date Thu, 03 Apr 2003 05:10:33 GMT


On Wed, 2 Apr 2003, __matthewHawthorne wrote:

> I apologize if anyone has already made this point, but...
>
> If I'm writing code that uses a class called org.cavity.Thing...
>
> import org.cavity.*
> import org.apache.*
>
> public class Test {
>
> 	Thing t = new Thing();
>
> }
>
> But later on, if the class org.apache.Thing is created, the code will no
> longer compile, right?
>
> Isn't this an untouchable reason for using explicit imports?

Yes it is. Ever since I found this out the hard way, I've avoided * like
the plague. I'd wager that anyone who feels otherwise would rapidly change
their mind the first time they add a class to their library and have their
user base whining because that new class broke their client builds. ;-)

--
Martin Cooper


>
>
>
> On Wed, 2003-04-02 at 16:54, Alex Chaffee / Purple Technology wrote:
> > On Wed, Apr 02, 2003 at 04:45:17PM -0500, Henri Yandell wrote:
> > >
> > > It's always fun when this debate comes up :) I think one of the biggest
> > > problems is the IDE. They do not separate the model and the view.
> > >
> > > For example, I should be able to say:
> > >
> > > Show me the source in this style, but do not modify the underlying style.
> > > Any change I make should adhere to that style.
> >
> > Hmmm.  Clever.
> >
> > On the other side, I could get my desired auto-complete behavior by an
> > option "Auto-Complete Uses Full Package Of External Imports" (or
> > something less incomprehensible).
> >
> > Against Being Anti -
> >
> >  - A
> >
> > --
> > Alex Chaffee                               mailto:alex@jguru.com
> > Purple Technology - Code and Consulting    http://www.purpletech.com/
> > jGuru - Java News and FAQs                 http://www.jguru.com/alex/
> > Gamelan - the Original Java site           http://www.gamelan.com/
> > Stinky - Art and Angst                     http://www.stinky.com/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message