public import and bugs it causes

Nick Sabalausky a at a.a
Fri May 14 12:56:58 PDT 2010


"bearophile" <bearophileHUGS at lycos.com> wrote in message 
news:hsk611$1utm$1 at digitalmars.com...
> Nick Sabalausky:
>
>> // 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?
>

In Java circles, and probably some others too, "import foo.*;" is widely 
considered bad practice. They have a number of reasons for avoiding its use. 
I don't mean to avoid mentioning them, but I don't have much time ATM, I'm 
sure you can easily google it though. But basically, there are known 
problems with it, and those problems are mitigated by using the "import 
foo.all;" idiom. 




More information about the Digitalmars-d mailing list