--- Comment #7 from bearophile_h...@eml.cc 2010-02-24 14:36:06 PST ---
>I think that because it will get in the way of the programmer and I expect
>that ,in practice, it will not solve the problem because people will just use
>"import foo.*;" by default.<
In Python that's doesn't happen, people usually import just the module name, or
some names from the module. The import all is discouraged.
And when people what to use the unqualified import syntax, adding two chars
".*" is not going to cost them much.
>We have that right now.<
We don't have it, there's a whole page about mitigating this problem:
And Overload Sets have being introduced as a patch on this problem.
>If importing all names from a module imports *random* names, than the problem
is not the import system, but what is in the module.<
By "random names" I didn't mean they are truly random, I mean that you don't
know what you are importing.
>I'll maintain that in a well designed library, if you need one thing from a
>module, you will need many/most of the things in it.<
In Phobos there are modules with 20-30 names of functions and other stuff. User
defined modules can have even more. D is not Java, you are supposed to put
related classes inside a single module. So about 100% of the times I don't use
all things that are present in those modules.
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------