Introduction to OOP
Chapter 27: Implementation :
next
previous
audio
real
text
Name Encoding
Different classes are allowed to have functions with the same name.
Some languages (C++) even permit multiple functions with the same name within a class.
Yet linkers usually want every function to have a unique name.
Solution
- generate an internal name that encodes both class name, function name, and argument types.
Example: Foo::Bar_int_float_int
Intro OOP,
Chapter 27
, Slide 06
An encoded name is sometimes called a
mangled name
. You will sometimes see mangled names in error messages generated by a linker.