DYNAMIC BINDING
\da͡ɪnˈamɪk bˈa͡ɪndɪŋ], \daɪnˈamɪk bˈaɪndɪŋ], \d_aɪ_n_ˈa_m_ɪ_k b_ˈaɪ_n_d_ɪ_ŋ]\
Sort: Oldest first
-
The property of object-oriented programming languages wherethe code executed to perform a given operation is determinedat run time from the class of the operand(s) (the receiverof the message). There may be several different classes ofobjects which can receive a given message. An expression maydenote an object which may have more than one possible classand that class can only be determined at run time. Newclasses may be created that can receive a particular message,without changing (or recompiling) the code which sends themessage. An class may be created that can receive any set ofexisting messages.C++ implements dynamic binding using "virtual memberfunctions".One important reason for having dynamic binding is that itprovides a mechanism for selecting between alternatives whichis arguably more robust than explicit selection byconditionals or pattern matching. When a new subclass isadded, or an existing subclass changes, the necessarymodifications are localised: you don't have incompleteconditionals and broken patterns scattered all over theprogram.See overloading.
By Denis Howe
Word of the day
Dopamine Acetyltransferase
- An enzyme that catalyzes the of groups from acetyl-CoA to arylamines. They have wide specificity for aromatic amines, particularly serotonin, and can also catalyze acetyl transfer between arylamines without CoA. EC 2.3.1.5.