Binding Time
The binding of names before the program is run is called static (also "early"); bindings performed as the program runs are dynamic (also "late" or "virtual").
An example of a static binding is a direct C function call: the function referenced by the identifier cannot change at runtime.
But an example of dynamic binding is dynamic dispatch, as in a C++ virtual method call. Since the specific type of a polymorphic object is not known before runtime (in general), the executed function is dynamically bound. Take, for example, the following Java code:
public void foo(java.util.ListList is an interface, so list must refer to a subtype of it. Is it a reference to a LinkedList, an ArrayList, or some other subtype of List? The actual method referenced by add is not known until runtime. In a language like C, the actual function is known.
Read more about this topic: Name Binding
Famous quotes containing the words binding and/or time:
“Hate traps us by binding us too tightly to our adversary.”
—Milan Kundera (b. 1929)
“For me, its enough! Theyve been here long enoughmaybe too long. Its a funny thing, though. All these years Fred was too busy to have much time for the kids, now hes the one whos depressed because theyre leaving. Hes really having trouble letting go. He wants to gather them around and keep them right here in this house.”
—Anonymous Parent. As quoted in Women of a Certain Age, by Lillian B. Rubin, ch. 2 (1979)