Proposal for an extension to the import syntax

Downs mathis.beer at tu-ilmenau.de
Mon Dec 11 04:08:00 PST 2006


At the moment the phobos standard library packages form a very flat structure.
However, it can be anticipated that with the availability of a 1.0 spec, more libraries written natively in D will arise.
These libraries may have a far deeper and more branched package structure.
Since D does not have a construct similar to Java's "import module.*",
this will lead to pagefuls of import, consisting mostly of redundant
information, and we all know redundancy is sin ^^
Thus I propose an extension to the import syntax similar in meaning to the following example:
   import package.sub_package.vendor.[module_a, module_b, module_c];
These groups could possibly be used recursively, e.g.
   import package.sub_package.vendor.[module_a.[sub1, sub2], module_b];

Any feedback, improvements, criticisms are appreciated.
Greetings.



More information about the Digitalmars-d mailing list