In programming languages, name binding is the association of entities (data and/or code) with identifiers. An identifier bound to an object is said to reference that object. Machine languages have no built-in notion of identifiers, but name-object bindings as a service and notation for the programmer is implemented by programming languages. Binding is intimately connected with scoping, as scope determines which names bind to which objects – at which locations in the program code (lexically) and in which one of the possible execution paths (temporally).
Use of an identifier in a context that establishes a binding for is called a binding (or defining) occurrence. In all other occurrences (e.g., in expressions, assignments, and subprogram calls), an identifier stands for what it is bound to; such occurrences are called applied occurrences.
Static binding (or early binding) is name binding performed before the program is run.
Dynamic binding (or late binding or virtual binding) is name binding performed as the program is running.
An example of a static binding is a direct C function call: the function referenced by the identifier cannot change at runtime.
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.List list) {
list.add("bar");
}
List is an interface, so list must refer to a subtype of it. list may reference a LinkedList, an ArrayList, or some other subtype of List. The method referenced by add is not known until runtime. In C, such an instance of dynamic binding may be a call to a function pointed to by a variable or expression of a function pointer type whose value is unknown until it is evaluated at run-time.
Rebinding should not be confused with mutation.
Rebinding is a change to the referencing identifier.
Mutation is a change to the referenced entity.
Cette page est générée automatiquement et peut contenir des informations qui ne sont pas correctes, complètes, à jour ou pertinentes par rapport à votre recherche. Il en va de même pour toutes les autres pages de ce site. Veillez à vérifier les informations auprès des sources officielles de l'EPFL.
La programmation orientée objet (POO), ou programmation par objet, est un paradigme de programmation informatique. Elle consiste en la définition et l'interaction de briques logicielles appelées objets ; un objet représente un concept, une idée ou toute entité du monde physique, comme une voiture, une personne ou encore une page d'un livre. Il possède une structure interne et un comportement, et il sait interagir avec ses pairs.
In programming languages, name binding is the association of entities (data and/or code) with identifiers. An identifier bound to an object is said to reference that object. Machine languages have no built-in notion of identifiers, but name-object bindings as a service and notation for the programmer is implemented by programming languages. Binding is intimately connected with scoping, as scope determines which names bind to which objects – at which locations in the program code (lexically) and in which one of the possible execution paths (temporally).
En informatique, les variables sont des symboles qui associent un nom (l'identifiant) à une valeur. Dans la plupart des langages et notamment les plus courants, les variables peuvent changer de valeur au cours du temps (dynamique). Dans les langages de certains paradigmes, notamment la programmation fonctionnelle, leur valeur est au contraire figée dans le temps (statique). Contrairement à une variable, une constante est un identificateur associé à une valeur fixe. Syntaxiquement, cet identificateur a tous les aspects d'une variable.
Les étudiants perfectionnent leurs connaissances en Java et les mettent en pratique en réalisant un projet de taille conséquente. Ils apprennent à utiliser et à mettre en œuvre les principaux types de
Discrete mathematics is a discipline with applications to almost all areas of study. It provides a set of indispensable tools to computer science in particular. This course reviews (familiar) topics a
Explore les quantificateurs avec des domaines finis, le quantificateur d'unicité, les instructions composites, la liaison de variables et la validité en logique.
Explore l'influence de la linguistique computationnelle sur les architectures d'apprentissage profond, couvrant les formalismes grammaticaux, le connexionnisme, la liaison variable et les orientations futures.