FACTOID # 14: If you like kids, then Uganda might be the place for you. Half the population is under 15!
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > Name binding

In programming languages, name binding refers to the association of values with identifiers. An identifier bound to a value is said to reference that value. Since computers themselves have no notion of identifiers, there is no binding at the assembly level — name binding is an abstraction provided by programming languages. Binding is intimately connected with scoping, as scope determines when binding occurs. A programming language or computer language is a standardized communication technique for expressing instructions to a computer. ... Value is a term that expresses the concept of worth in general, and it is thought to be connected to reasons for certain practices, policies, or actions. ... Identifiers (IDs) are lexical tokens that name entities. ... In general, a reference is something that refers or points to something else, or acts as a connection or a link between two things. ... Assembly may refer to the following things: In politics, any body meeting together to discuss matters, a parliament or a legislative assembly such as the French revolutionary Legislative Assembly, or a body more designed to mediate between otherwise independent bodies, such as the United Nations General Assembly. ... // An abstraction is an idea, concept, or word which defines the phenomena which make up the concrete events or things which the abstraction refers to, the referents. ... In computer programming in general, a scope is an enclosing context. ...


Rebinding and Mutation

Rebinding should not be confused with mutation — "rebinding" is changes to the referencing identifier; "mutation" is changes to the referenced value. Consider the following Java code: In biology, mutations are permanent, sometimes transmissible (if the change is to a germ cell) changes to the genetic material (usually DNA or RNA) of a cell. ... Java is an object-oriented programming language developed by James Gosling and colleagues at Sun Microsystems in the early 1990s. ...

 LinkedList<String> l; l = new LinkedList(); l.add("foo"); l = null; 

The identifier l at first references nothing (the null object); it is then rebound to reference an object (a linked list of strings). The linked list referenced by l is then mutated, adding a string to the list. Lastly, l is rebound to the null object.


Binding time

A binding is static if it occurs before a program runs; it is dynamic if it occurs at run time. Static binding are somtimes refereed to as early bindings, and dynamic bindings are referred to as late bindings.


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. For example: The C Programming Language, Brian Kernighan and Dennis Ritchie, the original edition that served for many years as an informal specification of the language The C programming language is a low-level standardized programming language developed in the early 1970s by Ken Thompson and Dennis Ritchie for use on the... In computer science, dynamic dispatch is the process of mapping a message to a specific sequence of code (method) at runtime. ... C++ (pronounced see plus plus, IPA: /siː pləs pləs/) is a general-purpose computer programming language. ... Polymorphism also refers to polymorphic code, computer code that mutates for each new time it is executed. ...

 public void foo(List<String> l) { l.add("foo"); } 

Is l a LinkedList, an ArrayList, or some other subtype? The actual method referenced by add is not known until runtime. (Note that in the first example, the actual method is known.) ...


Since copmiled programs are often relocatable in memory, every memory reference is ultimately a dynamic binding. Each variable or function is referenced as an offset from a memory segment, which is not known until runtime. This is a pedantic distinction, however, as binding operates at the programming-language level and not the machine level. A compiler is a computer program that translates a computer program written in one computer language (called the source language) into an equivalent program written in another computer language (called the output or the target language). ... On the Intel x86 architecture, a memory segment is the portion of memory which may be addressed by a single index register without changing a 16-bit segment selector. ...


  Results from FactBites:
 
Name binding constructs (953 words)
In a name binding construct a number of names are bound to values.
The name bindings can be used in the body, which must be an expression when we are working in the functional paradigm.
As a consequence, the names are bound simultaneously relative to the name bindings in effect in the context of the
Name binding - Wikipedia, the free encyclopedia (435 words)
Name binding bridges the conceptual gap between the program as described by its source code, and the program as it actually executes at runtime.
Binding time and type of variables (in particular local variables) is heavily influenced by scoping.
For named objects with static duration such as simple functions and global variables, binding takes place at compile or link time: the binding is fixed during the execution of the program, and is as such static.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.