the point of selective importing

Jari-Matti Mäkelä jmjmak at utu.fi.invalid
Tue Jul 11 16:51:08 PDT 2006


Derek Parnell wrote:
> On Tue, 11 Jul 2006 23:20:39 +0300, Jari-Matti Mäkelä wrote:
> 
>> In my
>> experience if your having more than 1-2 conflicting members, you're
>> doing something wrong.
> 
> That might be true if all the modules you use are under your direct
> control. However, the times I've had name clashes have been due to using
> libraries written by other people who, independently, decided to use the
> same name. Thus in my code, I am forced to disambiguate them. 
> 
> Consider the simple situation in Phobos
> 
>  std.string.find
>  std.regexp.find
>  internal.gc.gcx.find
> 
> then add the various other 'find' members in external libraries.

Ok, have to admit that's true. But do you really use them all in the
same module? If there's only a small amount of conflicting names, the
import syntax does not have to be so incredibly complex.



More information about the Digitalmars-d mailing list