Late Binding | Glossary


Late binding it is also called as Dynamic Binding. Basically it is a computer software mechanism where binding means link between procedure call and code to be executed. This binding if it is done at runtime when procedure call is triggered is called Late Binding.

In Late Binding, compiler comes to know at runtime that which method or function on an Object will be called based on number of arguments or type of arguments passed. In object-oriented language, the compilation phase fixes all types of variables and expressions which is usually stored in v-table and is very efficient. With late binding the compiler does not read information to verify the method exists instead the method is looked up by name and arguments at runtime.

The advantage of using late binding in Component Object Model programming is that it does not require the compiler to refer the libraries that contain the object at compile time, which makes the compilation process more resistant to version conflicts where class in v-table may be accidentally modified. This is not a concern in Just In Time compiler where v-table is created at runtime by virtual machines against the libraries which are loaded into the runtime applications.

Further Reading:

Book: Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.