Module names shadowing defined functions/templates.

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Wed Sep 28 22:22:52 PDT 2016


On 9/28/2016 9:17 PM, Minty Fresh wrote:
> While I can imagine there are technical challenges that have caused this issue
> to be the way it is, it's still a pretty major flaw to try to work around.

Overloading of names is a constant minefield of unexpected problems, arbitrary 
rules to disambiguate, and obtuse error messages when the compiler picks the 
wrong one. Worse, this proposal is asking for syntax-dependent name lookups.

Having a consistent, general name lookup scheme has its own advantages, like 
predictability, as opposed to a lot of special case rules.


> Working around shortcomings of a language is never a good place to be in.

I recommend changing one of the names and moving on.



More information about the Digitalmars-d mailing list