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:

    Go; and if that word have not quite killed thee,
    Ease me with death by bidding me got too.
    Oh, if it have, let my word work on me,
    And a just office on a murderer do.
    Except it be too late to kill me so,
    Being double dead: going, and bidding go.
    John Donne (1572–1631)

    Hate traps us by binding us too tightly to our adversary.
    Milan Kundera (b. 1929)