You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Jon Stevens <jo...@latchkey.com> on 2001/03/23 20:18:10 UTC

Re: cvs commit: jakarta-velocity/src/java/org/apache/velocity/texen Generator.java

on 3/23/01 8:05 AM, "jvanzyl@apache.org" <jv...@apache.org> wrote:

> Modified:    src/java/org/apache/velocity/texen Generator.java
> Log:
> - fully qualifying import statements
> 

I'm not objecting at all...but...

Just curious, why do we do this?

-jon


Re: cvs commit:jakarta-velocity/src/java/org/apache/velocity/texen Generator.java

Posted by Rafal Krzewski <Ra...@e-point.pl>.
Jon Stevens wrote:
> I'm not objecting at all...but...
> 
> Just curious, why do we do this?

1) Some people consider using .*s in imports as the sign of sloppy
and careless programming. So fully qualifying would please them,
if they review our code sometime. 

2) When you reorganize the package structure, the compiler will
help you to keep track of what moved where, when you fully 
qualify the classes.

3) It *could* speed up the compilation a bit, but I don't see much
purpose in speeding up jikes... (oh well maybe the machine I use 
in the office is too fast :))

Rafal


--
Rafal Krzewski
Senior Internet Developer
mailto:Rafal.Krzewski@e-point.pl
+48 22 8534830 http://e-point.pl

Re: cvs commit:jakarta-velocity/src/java/org/apache/velocity/texenGenerator.java

Posted by Daniel Rall <dl...@collab.net>.
"Geir Magnusson Jr." <ge...@optonline.net> writes:

> I know.  There is no real downside afaik, and it does make things easier
> for the casual reader...

etags.  :)

Regardless, I agree that fully qualifying import statements is nice if
there aren't an obscenely large number of them from a single package.

Daniel

Re: cvs commit:jakarta-velocity/src/java/org/apache/velocity/texenGenerator.java

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Jon Stevens wrote:
> 
> on 3/23/01 2:09 PM, "Geir Magnusson Jr." <ge...@optonline.net> wrote:
> 
> > So you know where stuff comes from ....
> 
> Yea, I guess I just have been working with Java to long...I have 99% of the
> API's that I use often pretty much memorized at this point...

Sure.  But for new or non-standard API's,...

> Again...was just curious...wasn't objecting...

I know.  There is no real downside afaik, and it does make things easier
for the casual reader...

geir

-- 
Geir Magnusson Jr.                               geirm@optonline.net
Developing for the web?  See http://jakarta.apache.org/velocity/

Re: cvs commit: jakarta-velocity/src/java/org/apache/velocity/texenGenerator.java

Posted by Jon Stevens <jo...@latchkey.com>.
on 3/23/01 2:09 PM, "Geir Magnusson Jr." <ge...@optonline.net> wrote:

> So you know where stuff comes from ....

Yea, I guess I just have been working with Java to long...I have 99% of the
API's that I use often pretty much memorized at this point...

Again...was just curious...wasn't objecting...

-jon


Re: cvs commit: jakarta-velocity/src/java/org/apache/velocity/texenGenerator.java

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Jon Stevens wrote:
> 
> on 3/23/01 8:05 AM, "jvanzyl@apache.org" <jv...@apache.org> wrote:
> 
> > Modified:    src/java/org/apache/velocity/texen Generator.java
> > Log:
> > - fully qualifying import statements
> >
> 
> I'm not objecting at all...but...
> 
> Just curious, why do we do this?

So you know where stuff comes from ....


-- 
Geir Magnusson Jr.                               geirm@optonline.net
Developing for the web?  See http://jakarta.apache.org/velocity/

Re: cvs commit:jakarta-velocity/src/java/org/apache/velocity/texen Generator.java

Posted by Rafal Krzewski <Ra...@e-point.pl>.
Jason van Zyl wrote:
> But mostly I like it because you know where things
> live and can track them down if you wish without
> having to poke around in a bunch of different
> hierarchies to find what you're looking for.

Unix find & grep can do wonders... but you are right,
having the explicit locations can save tons of time.

Rafal

--
Rafal Krzewski
Senior Internet Developer
mailto:Rafal.Krzewski@e-point.pl
+48 22 8534830 http://e-point.pl

Re: cvs commit:jakarta-velocity/src/java/org/apache/velocity/texen Generator.java

Posted by Jason van Zyl <jv...@apache.org>.
Jon Stevens wrote:
> 
> on 3/23/01 8:05 AM, "jvanzyl@apache.org" <jv...@apache.org> wrote:
> 
> > Modified:    src/java/org/apache/velocity/texen Generator.java
> > Log:
> > - fully qualifying import statements
> >
> 
> I'm not objecting at all...but...
> 
> Just curious, why do we do this?
> 
> -jon

For standard java utilties like Hashtable you know where it
comes from. But if you have something like.

import org.x.util.*;
import org.y.util.*;
import org.z.util.*;

Then it's hard to know where a class lives if you
want to take a look at the source and see how it
works. Plus you avoid cases of ambiguity where to
classes in different packages have the same name.
But mostly I like it because you know where things
live and can track them down if you wish without
having to poke around in a bunch of different
hierarchies to find what you're looking for.

-- 
jvz.

Jason van Zyl
jvanzyl@apache.com

http://jakarta.apache.org/velocity
http://jakarta.apache.org/turbine
http://tambora.zenplex.org