commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Ross" <>
Subject RE: import * vs explicit debate
Date Thu, 03 Apr 2003 22:54:01 GMT

Brace on the same line!!!! ;)

-----Original Message-----
From: Adrian Sutton [] 
Sent: Thursday, April 03, 2003 4:43 PM
To: 'Jakarta Commons Developers List'
Subject: RE: import * vs explicit debate

Preamble: Interesting insights into the programmers mind are coming out
this thread. :)

>Yes, he will understand this error message, but why should he have to?
>Alphonse always used explicit imports, this kind of error message would
>never show up at all, and his build would have never been broken.

For me the question comes down to efficiency since the compiled code is
completely identical.  There are two cases where compile errors arise:

1. A new class was added with the same name as another class I use via
implicit import.

2. I'm using explicit imports and want to use a new class in the file.

In both cases, I must stop what I'm doing and add a new import.  So,
happens more often?  In my development I've started using a new class
thousands of times and rarely get ambiguous class errors (the
javax.swing.text.Element and org.w3c.dom.Element would be the most
and I tend to be using both of them so no import structure would help),
probably about 50 of the first case to every 1 of the second, so without
doubt implicit imports are more efficient.

I personally never actually look at the imports myself so I don't care
is easier to read etc, I just want to develop code without being
because I need to manage my imports again.

Anyway, carry on, it's quite interesting to see the justifications
coding styles come out.  I can't wait for the brace on the same line or
brace on the next line debate. :)


Adrian Sutton, Software Engineer
Ephox Corporation

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message