extern(C++, ns)

Martin DraĊĦar via Digitalmars-d digitalmars-d at puremagic.com
Wed Jan 20 15:12:00 PST 2016


Dne 20.1.2016 v 23:01 Walter Bright via Digitalmars-d napsal(a):
> I understand his suggestion. I asked Manu to elaborate what the "serious
> problems" are. This code snippet doesn't work as it is not supposed to
> work, but still unknown is what the "serious problem" with it is - and I
> want to ensure that Manu knows this is not a bug in the implementation.

Bugs in implementation are a separate concern. The "serious" problem is
that the decision to have a namespace introduce a new scope needlessly
complicates writing D-like interfaces to C++ code, while catering for
one specific use-case that is considered niche.

Everything in this thread has been repeated at least three times. Yet
you still stand by your design decision and offer more or less
convoluted ways to deal with it.

I guess that at this point it would be great to introduce some hard
data. For example, how often would you encounter the problem with the
same identifiers distinguished by namespaces, if you tried to interface
to some typical C++ libraries. Because, unless you really must have your
interface in one file, this should be fairly rare (at least from my
experience).

Martin


More information about the Digitalmars-d mailing list