I was trying to understand the difference between early and late binding, and in the process realized that the concept of binding is nebulous to me. I think I understand that it relates to the way data-as-a-word-of-memory is linked to type-as-a-set-of-language-features but I am not sure those are the right concepts. Also, how does understanding this deeply help people become better programmers?
Please note: This question is not "what is late v. early binding" or "what are the trade-offs between the 2". Those already exist here.
Thanks,
JDelage
At its simplest, binding is the association of a symbol within a program with an address in memory.
For example: a function call in C. When you declare a function, the compiler records the function's name and the location of its code within the object file. When you call a function from a separately compiled file, the compiler records a reference to that name in the place where the call occurs. The linker is responsible for binding these two references, so that the call will reference the correct memory location.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With