Late Binding

Late binding is a computer programming mechanism in which the method being called upon an object is looked up by name at runtime. This is informally known as duck typing or name binding.

Late binding is often confused with dynamic dispatch, but there are significant differences. With early binding the compiler statically verifies that there are one or more methods with the appropriate method name and signature. This is usually stored in the compiled program as an offset in a virtual method table ("v-table") and is very efficient. With late binding the compiler does not have enough information to verify the method even exists, let alone bind to its particular slot on the v-table. Instead the method is looked up by name at runtime.

The primary advantage of using late binding in Component Object Model (COM) programming is that it does not require the compiler to reference the libraries that contain the object at compile time. This makes the compilation process more resistant to version conflicts, in which the class's v-table may be accidentally modified. (This is not a concern in JIT-compiled platforms such as .NET or Java, because the v-table is created by the secondary compiler against the libraries as they are being loaded into the running application.)

Read more about Late Binding:  History, Criticism

Famous quotes containing the words late and/or binding:

    Perhaps anxious politicians may prove that only seventeen white men and five negroes were concerned in the late enterprise; but their very anxiety to prove this might suggest to themselves that all is not told. Why do they still dodge the truth? They are so anxious because of a dim consciousness of the fact, which they do not distinctly face, that at least a million of the free inhabitants of the United States would have rejoiced if it had succeeded. They at most only criticise the tactics.
    Henry David Thoreau (1817–1862)

    With a binding like you’ve got, people are gonna want to know what’s in the book.
    Alan Jay Lerner (1918–1986)