public import and bugs it causes

bearophile bearophileHUGS at lycos.com
Fri May 14 11:50:09 PDT 2010


Nick Sabalausky:

> 1. The problem he had had nothing to do with public imports. Any of the 
> modules he was importing could just as easily had a global var named "name" 

Yes, that's caused by another hole in the design of D module system, that I hope to see fixed someday. It's almost three years from the first time I have reported it, probably in my second post on D newsgroups.


> 2. Public imports are very useful.

They are useful as casts between signed and unsigned values. But usually they are not a clean solution.
A module system has right the opposite purpose :-)


> // Vastly superior alternative to "import foolib.*;" which D
> // (fortunately) doesn't even have anyway.
> module foolib.all;

What's vastly superior in it? Its unformalized nature?

Bye,
bearophile


More information about the Digitalmars-d mailing list