Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

dynamic binding

You are here: irt.org | FOLDOC | dynamic binding

The property of object-oriented programming languages where the code executed to perform a given operation is determined at run time from the class of the operand(s) (the receiver of the message). There may be several different classes of objects which can receive a given message. An expression may denote an object which may have more than one possible class and that class can only be determined at run time. New classes may be created that can receive a particular message, without changing (or recompiling) the code which sends the message. An class may be created that can receive any set of existing messages.

C++ implements dynamic binding using "virtual member functions".

One important reason for having dynamic binding is that it provides a mechanism for selecting between alternatives which is arguably more robust than explicit selection by conditionals or pattern matching. When a new subclass is added, or an existing subclass changes, the necessary modifications are localised: you don't have incomplete conditionals and broken patterns scattered all over the program.

See overloading.

Nearby terms: dynamically scoped « dynamically typed « dynamic analysis « dynamic binding » dynamic database management system » Dynamic Data Exchange » Dynamic Data Linking

FOLDOC, Topics, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, ?, ALL

©2018 Martin Webb