DIP16: Transparently substitute module with package

Martin Nowak dawg at dawgfoto.de
Sat Mar 31 09:51:51 PDT 2012


> However, I'm very nervous about the second part. e.g. std.sort instead of
> std.algorithm.sort seems like a bad idea to me. It increases the odds of  
> name
> conflicts for little benefit. Not to mention, it'll make it a lot more  
> confusing
> to find what modules stuff is actually in if people start doing stuff  
> like
>
> std.sort(arr);

You can turn that argument around, std.sort(arr) instead of sort(arr)
provides some extra context for disambiguation.
You'd be able to do that for public imports in the package.d module anyhow,
so it makes sense to support it for implicit packages as well.


More information about the Digitalmars-d mailing list