commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Chaffee / Purple Technology <g...@stinky.com>
Subject Re: import * vs explicit debate
Date Thu, 03 Apr 2003 00:45:27 GMT
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


Mime
View raw message