View mode: basic / threaded / horizontal-split · Log in · Help
July 31, 2007
Re: proposal: improved import declaration
David B. Held Wrote:

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

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 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;
 public import;
 public import;  
 // ...

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