On Wednesday, 5 September 2018 at 13:53:15 UTC, Jonathan M Davis
wrote:
On Wednesday, September 5, 2018 7:03:26 AM MDT Nicholas Wilson
via Digitalmars-d wrote:
[...]
Based on everything Walter said in the previous thread, it
honestly seems to me to be primarily like he just can't give up
on the idea that D has to worry about modeling C++ namespaces.
Pretty much all of the extra complications that come from the
current approach stem from insisting on modeling namespaces in
D instead of just treating the namespace as part of the
information that you give to the compiler to indicate what the
symbol in D is supposed to correspond to in C++ when the
compiler goes to mangle it.
[...]
I wholeheartedly agree. C++ namespaces are a C++ language idea
that D has discarded in favor of much simpler facilities.
Injecting that <expletive-deleted> back into D when linking to
C++ is polluting D with needless complexity at odds with that
gain in simplicity. The name collision problem with two
namespaces containing the same name can be resolved with much
simpler facilities. For example, at the point of the extern
declaration, the name of the linked entity could be provided as
an optional third parameter so that the name in D could be
different. I'm sure many other simple schemes could be invented,
more consistent with D's approach.
- Re: extern(C++, ns) is wrong Manu via Digitalmars-d
- Re: extern(C++, ns) is wrong Paolo Invernizzi via Digitalmars-d
- Re: extern(C++, ns) is wrong Walter Bright via Digitalmars-d
- Re: extern(C++, ns) is wrong Walter Bright via Digitalmars-d
- Re: extern(C++, ns) is wrong Jonathan M Davis via Digitalmars-d
- Re: extern(C++, ns) is wrong rikki cattermole via Digitalmars-d
- Re: extern(C++, ns) is wrong Nicholas Wilson via Digitalmars-d
- Re: extern(C++, ns) is wrong Jonathan M Davis via Digitalmars-d
- Re: extern(C++, ns) is wrong Nicholas Wilson via Digitalmars-d
- Re: extern(C++, ns) is wrong Carl Sturtivant via Digitalmars-d
- Re: extern(C++, ns) is wro... Manu via Digitalmars-d
- Re: extern(C++, ns) is wro... Danni Coy via Digitalmars-d
- Re: extern(C++, ns) is wro... Jonathan M Davis via Digitalmars-d
- Re: extern(C++, ns) is wro... Manu via Digitalmars-d
- Re: extern(C++, ns) is wro... Jonathan M Davis via Digitalmars-d
- Re: extern(C++, ns) is wro... Danni Coy via Digitalmars-d
- Re: extern(C++, ns) is wro... Jonathan M Davis via Digitalmars-d
- Re: extern(C++, ns) is wro... Danni Coy via Digitalmars-d
- Re: extern(C++, ns) is wro... Jonathan M Davis via Digitalmars-d
- Re: extern(C++, ns) is wro... Manu via Digitalmars-d