extern(C) names are being mangled; that's crazy, Walter says I'm crazy

Jonathan Marler johnnymarler at gmail.com
Thu Jul 25 00:24:11 UTC 2019


On Wednesday, 24 July 2019 at 09:56:50 UTC, Manu wrote:
> On Wed., 24 Jul. 2019, 2:20 am Walter Bright via Digitalmars-d, 
> < digitalmars-d at puremagic.com> wrote:
>
>> I never called you crazy, or anything remotely like that.
>>
>
> Just kill me and bring me peace.
> I lose my mind trying to argue with you, and get so frustrated 
> and angry, I
> just have to take a week or 2 timeout.
> I feel like this community just grinds my life away slowly but 
> steadily and
> I hate participating, but I'm in too deep. I just want to kick 
> my goal and
> get on with my job!
> Everything is just so hard, and so very weird.
> Why can't stuff just be predictable? Why does everything have 
> to have weird
> special case rules and strange edge cases?
>
> My biggest trouble with D recently had been trying to explain 
> it to people,
> and make them not lose confidence when they run in to a long 
> series of
> stuff like this.
> I have to try and explain weird shit like it's got a good 
> reason with a
> straight face, and I just can't do that on so many accounts!
> This is D's biggest enemy in 2019, I'm sure of it.
>
> Anyway... I'm sorry, this is actually a distraction. I've 
> managed to lose my laser focus on shared stuff. That's what I 
> need today to progress.

You're not crazy.  Walter can bey hard to discuss things with.  I 
think he's tired of discussing things after so many years.  He 
tends to ignore most things and only responds to what he thinks 
is important.   If you're feeling burnt out, imagine how he feels 
after all the years he's been doing this.

But know that you're not the only one who feels this way, and 
Walter tends to have a very different viewpoint on things.  So 
don't take it personally, just because he disagrees with you 
doesn't mean you're wrong.

As for this subject, I expect extern (C) to change both the API 
and the mangling, so I would expect the behavior described by 
Manu.  However, I can see use cases for only changing the ABI 
while keeping mangling.  It is very weird that extern (C) affects 
both in normal code, and only the ABI when it's inside a mixin 
template.  Sounds like one of those very odd cases in C++ that 
Scott Meyers would put on one of his slides :)

Dconf 2014 Day 2 Keynote: The Last Thing D Needs -- Scott Meyers
https://www.youtube.com/watch?v=KAWA1DuvCnQ

After reading the thread and thinking on a bit, it seems like it 
would be simpler to have extern (C) do the same thing in all 
cases, which would be to change the ABI and the mangling.  If you 
want D mangling, use mangle(D) or something along with extern (C).



More information about the Digitalmars-d mailing list