commons-dev mailing list archives

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

Brace on the same line!!!! ;)

-----Original Message-----
From: Adrian Sutton [mailto:adrian.sutton@ephox.com] 
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
on
this thread. :)

>Yes, he will understand this error message, but why should he have to?
If
>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
an
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,
which
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
common
and I tend to be using both of them so no import structure would help),
it's
probably about 50 of the first case to every 1 of the second, so without
a
doubt implicit imports are more efficient.

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

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

Regards,

Adrian Sutton, Software Engineer
Ephox Corporation
www.ephox.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