Name Mangling

In compiler construction, name mangling (also called name decoration) is a technique used to solve various problems caused by the need to resolve unique names for programming entities in many modern programming languages.

It provides a way of encoding additional information in the name of a function, structure, class or another datatype in order to pass more semantic information from the compilers to linkers.

The need arises where the language allows different entities to be named with the same identifier as long as they occupy a different namespace (where a namespace is typically defined by a module, class, or explicit namespace directive).

Any object code produced by compilers is usually linked with other pieces of object code (produced by the same or another compiler) by a type of program called a linker. The linker needs a great deal of information on each program entity. For example, to correctly link a function it needs its name, the number of arguments and their types, and so on.

Read more about Name Mangling:  C Name Decoration in Microsoft Windows, Name Mangling in C++, Name Mangling in Java, Name Mangling in Python, Name Mangling in Borland's Turbo Pascal / Delphi Range, Name Mangling in Free Pascal, Name Mangling in Objective-C, Name Mangling in Fortran

Famous quotes containing the word mangling:

    How can anyone be interested in war?—that glorious pursuit of annihilation with its ceremonious bellowings and trumpetings over the mangling of human bones and muscles and organs and eyes, its inconceivable agonies which could have been prevented by a few well- chosen, reasonable words. How, why, did this unnecessary business begin? Why does anyone want to read about it—this redundant human madness which men accept as inevitable?
    Margaret Anderson (1886–1973)