February 21, 2012

What is Binding?

Taken from the following article
What is "binding" and What makes it late? by Eric Lippert
Binding is the association of a syntactic element that names a method with a logical element of the program. So, speaking generally I would say that "binding" is any association of some fragment of syntax with some logical program element.

Basically by "early binding" we mean "the binding analysis is performed by the compiler and baked in to the generated program"; By "late binding" we mean "some aspect of the binding will be performed by the runtime" and therefore a binding failure will manifest as a runtime failure.

Early and late binding might better be called "static binding" and "dynamic binding"; static binding is binding performed using "static" facts known to the compiler, and dynamic binding is performed using facts "dynamically" known to the runtime.

No comments: