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:

    And last of all, high over thought, in the world of morals, Fate appears as vindicator, levelling the high, lifting the low, requiring justice in man, and always striking soon or late when justice is not done. What is useful will last, what is hurtful will sink.
    Ralph Waldo Emerson (1803–1882)

    [Government’s] true strength consists in leaving individuals and states as much as possible to themselves—in making itself felt, not in its power, but in its beneficence, not in its control, but in its protection, not in binding the states more closely to the center, but leaving each to move unobstructed in its proper orbit.
    Andrew Jackson (1767–1845)