extern(C++, ns) is wrong

Manu turkeyman at gmail.com
Tue Sep 4 22:33:34 UTC 2018


file1.d
---------
module bliz.ecs.component_access;
import bliz.ecs.table;
import bliz.ecs.types;
extern(C++, bliz):
// things...

Error: project\ecs\include\d2\bliz\ecs\component_access.d(7): Error:
namespace `bliz.ecs.component_access.bliz` conflicts with import
`bliz.ecs.component_access.bliz` at
project\ecs\include\d2\bliz\ecs\component_access.d(3)

file2.d
---------
module bliz.ecs.table;
import bliz.ecs.types;
extern(C++, bliz):
// things...

Error: project\ecs\include\d2\bliz\ecs\table.d(11): Error: namespace
`bliz.ecs.table.bliz` conflicts with import `bliz.ecs.table.bliz` at
project\ecs\include\d2\bliz\ecs\table.d(5)


Oh yeah, I forgot, root namespace in D can not be the same as the C++
namespace... common sense would dictate that they be the same thing,
but that's the exact thing that they can not be.


Walter: This is not sustainable!
Please add no-scope string namespace.
I have no option left available besides literally begging you. Please
put an end to this madness. It can live peacefully beside your
preferred design with the scopes. We can both have our cake.

The design is a critical failure; everything you write leads to
problems in the simplest forms. It's a constant ongoing hurdle, and I
have to contort my code to undo a thing that should never have been
there. It's truly embarrassing. I can't show this to people.

***I can not present my work to stakeholders with a straight face***

I don't know what to do other than fork the compiler and add it
locally, and then we'd be stuck on a dialect, and that would be truly
terrible!

Andrei, please convince Walter to fix this... please.
I beg you both. Just fix it...
There was community consensus in the last uber-thread on the matter.


More information about the Digitalmars-d mailing list