mangle

Jonathan M Davis jmdavisprog at gmail.com
Thu Jul 1 19:34:09 PDT 2010


On Thursday, July 01, 2010 19:13:02 Rainer Deyke wrote:
> On 7/1/2010 19:32, Jonathan M Davis wrote:
> > By the way, why _does_ D mangle its names? What's the advantage? I
> > understood that C++ does it because it was forced to back in the days
> > when it was transformed into C code during compilation but that it's now
> > generally considered a legacy problem that we're stuck with rather than
> > something that would still be considered a good design decision.
> > 
> > So, why did D go with name mangling? It certainly makes stuff like stack
> > traces harder to deal with. I've never heard of any advantage to name
> > mangling, only disadvantages.
> 
> Because DMD is stuck with a C-age linker.

Well, I guess that it just goes to show how little I understand about exactly 
how linking works when I don't understand what that means. After all, C doesn't 
using name mangling. Does that mean that name mangling it meant as a namespacing 
tool to ensure that no D function could possibly have the same linking name as a 
C function?

- Jonathan M Davis


More information about the Digitalmars-d mailing list