public import and bugs it causes

Leandro Lucarella llucax at gmail.com
Fri May 14 18:53:46 PDT 2010


Walter Bright, el 14 de mayo a las 14:54 me escribiste:
> Leandro Lucarella wrote:
> >Python have import foo.*; and you can controll it the same way you can in
> >D, except that if you don't do any fine control the default is to export
> >everything.
> >
> >I think D is missing a feature here, not fixing or mitigating anything.
> 
> It's deliberately missing it.

I didn't say it's deliberate. I know is deliberate =)
I just don't think is a good idea.

> If the designer of a package wants a convenient way for the user to
> import everything in the package, all he has to do is create an all.d
> module which publicly imports everything.

Yes, that's exactly what Nick said in the mail I was replying, I just
wanted to note that Nick was not right saying that not having import
foo.*; is better because people say is a "bad practice" in Java. You can
do better than hava and have the feature in a safe, useful way. Then, you
might still like it or not. I guess you and Nick don't like; I do (even
when I practically never use it, I like knowing it's there for the few
quick & dirty stuff where is handy =P).

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------


More information about the Digitalmars-d mailing list