extern(C++, ns) is wrong

Jonathan M Davis newsgroup.d at jmdavisprog.com
Fri Sep 14 19:45:42 UTC 2018


On Friday, September 14, 2018 10:56:45 AM MDT Manu via Digitalmars-d wrote:
> On Fri, 14 Sep 2018 at 07:55, 12345swordy via Digitalmars-d
>
> <digitalmars-d at puremagic.com> wrote:
> > On Friday, 14 September 2018 at 13:10:07 UTC, Atila Neves wrote:
> > > On Friday, 14 September 2018 at 09:56:52 UTC, Zot wrote:
> > >> [...]
> > >
> > > I'm also completely in favour of what Manu is saying. The
> > > current situation works for no one. I very much doubt that any
> > > D programmer exists that wants what extern(C++) currently does.
> > >
> > > Yes, C++ namespaces are a mess. Who cares? We have modules. All
> > > we want is to be able to link.
> > >
> > > Walter pointed out workarounds, but: they're solutions to a
> > > problem that shouldn't exist; are ugly as sin; aren't even
> > > sufficient for manually writing bindings in the way the author
> > > intends.
> > >
> > > Forum chatter won't do it though, we need a DIP.
> >
> > Someone is already on it.
> > https://github.com/look-at-me/DIPs/blob/please-for-the-love-of-all-thing
> > s-good-and-holy-fix-cpp-mangling-please-ok-sorry/DIPs/DIPxCPP.md
> I can't wait for a DIP.
> That's like 12 months turnaround, and I've already lost weeks waiting
> for some trivial PR's about version identifiers that are still
> pending... this will take years.

Per the current procedure, it pretty much has to be done via a DIP. It might
be possible for it to be fast-tracked, but without Walter and/or Andrei
being behind it from the get-go, the chances of that happening aren't good.
Really, the only way that this could go quickly would be if Walter and/or
Andrei were somehow convinced that extern(C++, NS) was completely broken and
that it was critical that it be fixed ASAP. And clearly, Walter is going to
be very hard to convince (though maybe we'll get lucky and Andrei will be
easy to convince - I have no clue what his position on the issue is). The
only real leverage here is likely that they think that C++ integration is
important. However, as long as Walter thinks that what we have should work
just fine, he's not about to rush to change it.

Regardless, given Walter's position on the situation, we pretty much have to
have a DIP if nothing else so that we have a clear, well-written document to
present to him. Arguing about it in the newsgroup clearly isn't getting us
anywhere. After a solid DIP is written, then _maybe_ we could find a way to
expedite things, but I think that he's already made it pretty clear that if
we want any chance of change, we need a DIP.

And while the DIP process might be annoyingly slow, if we don't get a DIP in
the queue, I think that it's pretty clear that nothing will change unless
Walter or Andrei does something significant with extern(C++, NS) and gets
really annoyed at how bad it is (which seems to be how Andrei usually gets
fired up on fixing something that other people had been insisting needed to
be changed, but he'd thought was fine).

- Jonathan M Davis





More information about the Digitalmars-d mailing list