commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juozas Baliuka" <bali...@centras.lt>
Subject Re: import * vs explicit debate
Date Thu, 03 Apr 2003 17:04:10 GMT
Yes,
"will no longer compile" is advantage for me too.
I found ".*" ans "short" package names are better to use in practice, but I
do not believe it is possible to find "the best way".

----- Original Message -----
From: "Alex Chaffee / Purple Technology" <guru@stinky.com>
To: "Jakarta Commons Developers List" <commons-dev@jakarta.apache.org>
Sent: Thursday, April 03, 2003 2:45 AM
Subject: Re: import * vs explicit debate


> On Wed, Apr 02, 2003 at 06:52:26PM -0500, __matthewHawthorne wrote:
> >
> > But later on, if the class org.apache.Thing is created, the code will no
> > longer compile, right?
>
> Right.
>
> > Isn't this an untouchable reason for using explicit imports?
>
> No; it's a reason for doing a full clean build and unit test run
> before checking in any changes.
>
> This way whoever added org.apache.Thing, or updated the library that
> added it, is responsible for not breaking everyone else's build.
>
> In this case causing a compiler error is good; the error will mention
> the name of the class that was just added; and the adder will say "oh,
> duh" and know what to do to fix it.  More troublesome are interface
> changes that are silently absorbed but cause semantic changes.
>
> --
> 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


Mime
View raw message