[811] in java-interest

home help back first fref pref prev next nref lref last post

package import

daemon@ATHENA.MIT.EDU (Mick Jordan)
Thu Jul 20 15:47:43 1995

Date: Thu, 20 Jul 1995 11:19:45 -0700
From: Mick.Jordan@Eng.Sun.COM (Mick Jordan)
To: java-interest@java.Eng.Sun.COM

The language definition talks about "importing a package", p22, but then
actually describes syntax for importing all the classes from a package, which
is not quite the same thing. The grammar in appendix B supports the latter view.

E.g.

  import acme.project.*

During my time programming in Modula-3 I became very comfortable using
qualified naming (i.e. "Module.Name") throughout; the readability being
much more important in the long term over how much typing I had to do,
particularly for large systems. Although Modula-3 had a construct
similar to Java's import (e.g. FROM X IMPORT Y), I (and others) rarely
used it.

A way to get the effect I want would be to allow package import, vis: 

  import acme;

and then use "project.X" in code, rather than the fully qualified
"acme.project.X". 

Mick Jordan
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post