Suggestion: module opcall
bearophile
bearophileHUGS at lycos.com
Thu Jan 8 09:33:36 PST 2009
bobef Wrote:
> The need for this is because often a module happens to be named as the functionality it contains and you have to write the stuff two times.<
A design bug in the D1 module system is that when you import foo normally you import in the namespace both the module name and the names it contains. So if you have foo inside foo you are in troubles. I'm waiting such design errors to be fixed still.
Anyway, you can solve your problem like this:
from foo import foo;
now you don't need to call foo two names to use it.
So for *this purpose* I think your proposal is bad (it may be good for other purposes).
Bye,
bearophile
More information about the Digitalmars-d
mailing list