Conventional module name for importing all modules in a package

From D Wiki
Revision as of 21:45, 23 November 2012 by Shd (talk | contribs) (import all)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In Java, if you want to import all of the modules in a package, you'd do this:

import javax.swing.*;

Since D doesn't have a "*" (and it's unlikely that D would get such a shortcut), this capability could be added to a class by adding a module, that imports the other modules. So what should such a module be called. There have been a few suggestions.

These are common conventions:

import mylibrary.mypackage.all;
import mylibrary.mypackage._;