Is there any good reason why C++ namespaces are "closed" in D?

Manu turkeyman at gmail.com
Wed Aug 1 19:01:58 UTC 2018


On Wed, 1 Aug 2018 at 03:05, Walter Bright via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
>
> > Was that a deliberate
> > strategy? I feel like that strategy's been used before.
>
> You repeatedly impugn my motives and/or my mental stability. While that doesn't
> bother me, it really does not help your case.

I'm not quite sure this is a fair connection... or certainly that's
not my intent.
But I do struggle to understand how our arguments about the
pointlessness of this complexity are so easy to dismiss, without
providing any substance at all, ever, in support of the design as is.
I can't accept workarounds involving manual intervention when the
problem shouldn't exist in the first place. This is busy-work which we
will continue to do ad-infinitum, and every time it occurs I just get
more upset and unreasonable.

> Please just stick to the technical issue.

That ball's in your court. You've never justified the design
complexity and the baggage it carries. I've prompted such
justification maybe 5 times in this thread already.
This isn't a technical debate. It never has been. If it was, we would
have arrived at "C++ namespaces are just for mangling" 6 years ago.
The evidence can't lead to any other conclusion.

> Believe it or not, I really want to help you (and Laeeth and Atila) be successful with this.

Then listen to us.
There's a blindingly obvious and ultimately simplifying solution. It
will literally resolve _every single case_ of issue or friction or
complaint i'm aware of that that has ever emerged regarding C++
namespace mangling.
It has never demonstrated to be useful, and we have never identified a
single issue that would be created in the process.
This entire class of problem will instantly disappear. And it's not
even a breaking change (ie, allow string, and then we can even solve
the additional problem where we can't refer to D reserved
names/keywords).

Unless there are actually technical reasons to wear this complexity,
recommendations including "use alias everywhere", or "put everything
in one file" will never satisfy.


More information about the Digitalmars-d mailing list