<div dir="auto"><div><div class="gmail_quote"><div dir="ltr">On Tue., 31 Jul. 2018, 3:40 am Jacob Carlborg via Digitalmars-d, <<a href="mailto:digitalmars-d@puremagic.com">digitalmars-d@puremagic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2018-07-31 10:12, Manu wrote:<br>
<br>
> Given your favourite example:<br>
> ----<br>
> module a;<br>
> extern(C++, ns) void foo();<br>
> ----<br>
> module b;<br>
> extern(C++, ns) void foo();<br>
> -----<br>
> module c;<br>
> import a, b;<br>
> foo(); // error: ambiguous<br>
> ns.foo(); // error, ambiguous (obviously)<br>
> a.ns.foo(); // naturally, this works... it's the D module that<br>
> correctly organises the symbol. 'ns' is worthless here<br>
<br>
This works:<br>
<br>
a.foo();<br>
<br>
You don't need "ns" in between the module name and the function.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Right... But did you miss the point? The D module does the organisation (as you show). The ns offers nothing and creates other kinds of problems.</div><div dir="auto">Just because name resolution traverses the namespace (in simple cases), there is an entire language of complexity that interacts with that name lookup, and as far as I know, it has never proven useful, but rather, only complicated and annoying leading to boilerplate and hacks in certain situations. (ie, this thread exists and many others)</div></div>