July 31, 2007
David B. Held Wrote:

> eao197 wrote:
> > [...]
> > import tango.io.{Console, Conduit, FilePath, FileSystem, Stdout};
> 
> I like Java's syntax better:
> 
> import tango.io.*;

I am glad that this is not supported.  I do not like the basic import statement at all.  I would like it restricted to static, renamed, and selective imports.  The reader of a file should not have to guess where any given symbol came from.

But I agree with the original poster that there should be something like Python's:
  from tango.io import a,b,c,...;

If you need to import dozens of modules from the same package, you can create a single module which does all the imports publicly.
  module alltango;
  public import tango.io.A;
  public import tango.io.B;
  public import tango.io.C;
  // ...

Then:
  import alltango;
gives you everthing.  But I still prefer static imports.
Top | Discussion index | About this forum | D home