What is name binding?

Stephen M. Walker II · Co-Founder / CEO

What is name binding?

Name binding refers to the association of entities (data and/or code) with identifiers. An identifier bound to an object is said to reference that object. This concept is closely related to scoping, as scope determines which names bind to which objects at which locations in the program code.

There are two main types of name binding: static and dynamic. Static binding (or early binding) is name binding performed before the program is run; an example is a direct function call in C, where the function referenced by the identifier cannot change at runtime. This is often used for performance optimization, since the compiler can resolve the binding ahead of time and avoid extra overhead during execution. Dynamic binding (or late binding or virtual binding), on the other hand, is name binding performed as the program runs, and allows the association between a name and a value to change during execution. A common example is dynamic dispatch, as in a C++ virtual method call or method overriding, where the type of the object determines which method executes at runtime.

Name binding also applies to symbolic programming and knowledge representation. In Lisp, for example, the progv special form allows binding one or more dynamic variables whose names are determined at runtime, and flet lets a program locally redefine a global function name for use within the scope of the flet form. In a symbolic program, bindings can associate symbols such as 'person, 'name, and 'age with corresponding values or accessor functions, letting the program represent structured knowledge like "a person has a name and an age."

A related concept is data binding, which couples two data sources together and keeps them synchronized: a change to an element in one data set automatically updates the bound data set. This is commonly used to link an application's user interface to the data it displays, such as in data entry forms, reports, and text box elements.

More terms

Continue exploring the glossary.

Learn how teams define, measure, and improve LLM systems.

Glossary term

Why is Analysis of Algorithms important?

Analysis of algorithms is crucial for understanding their efficiency, performance, and applicability in various problem-solving contexts. It helps developers and researchers make informed decisions about choosing appropriate algorithms for specific tasks, optimizing their implementations, and predicting their behavior under different conditions or inputs.
Read term

Glossary term

Guide to Large Language Models (LLMs)

Large Language Models (LLMs) are advanced artificial intelligence models that employ deep learning techniques to understand, generate, and predict text.
Read term

It's time to build

Collaborate with your team on reliable Generative AI features.
Want expert guidance? Book a 1:1 onboarding session from your dashboard.

Talk to sales