Late binding is a computer programing term that describes when a program accesses a portion of its code for the first time. Most programs are written as text and then compiled into a functioning program. During this process, the compiler verifies all of the connections in the program to make sure they are present and basically accurate. With late binding, the compiler doesn’t have access to some portions of the program, so they are left aside during compilation. When the program runs, the code is added in as needed.
The binding part of late binding refers to connecting a portion of code with the rest of the program. The vast majority of a program needs to be present and accurate during compilation. The compiler runs through the entire program to verify that all the calls go to things that actually exist and the information returned is in the correct format. This doesn’t mean the program works as intended; it simply means that the potential is there.
In a program using late binding, a portion of the program is missing. The compiler is instructed to basically ignore that part and keep on going. Sometimes, the calls are written in such a way that compiler doesn’t even realize they are there. This will basically make some sections of the program separate from the main part.
The main reason to use late binding is to simplify upgrades. By taking certain areas of the code out of the main program, it is possible to alter those sections without decompiling and recompiling the program. This also makes that section of the program completely self-contained, allowing for different types of access or security features.
While late binding does have its uses, it is a questionable coding method. Since the program is forced to add in code at the last minute, it will slow down the entire process. The program is unable to continue until it verifies the existence of the late portion and determines that it works correctly. While this verification may only take a fraction of a second, the program has to do it every single time it accesses the late part.
As far as simplifying upgrades, it works well—but so do less detrimental processes. Keeping a section of the program out of the compiler means that even tiny little issues, like a transposed letter or an extra space between two words, can cause a program failure. For this and other similar reasons, late binding is a less common option on newer programing languages.