On Thursday, 2 August 2018 at 04:59:52 UTC, Walter Bright wrote:
The difference is those names are supposedly in different
namespaces, given that the code is converted from C++:
namespace ab { void foo(long); }
... lots of code ...
namespace cd { void foo(int); }
where the foo()'s do not conflict with each other, and a user
would reasonably expect that same behavior when translated to D.
This is a trivial problem to solve.
mangle(C++, ab) { void foo(long); }
mangle(C++, cd) { void foo(int); }
It's certainly not obvious to me why anyone would do that, write
foo(3);
and then blame you when it doesn't work.