Opentopia Directory Encyclopedia Tools

Namespace

Encyclopedia : N : NA : NAM : Namespace


In Wikipedia, namespaces may refer to [Namespace]
In general, a namespace is an abstract container providing context for the items (names, or technical terms, or words) it holds and allows disambiguation of items having the same name (residing in different namespaces - compare: URL).

As a rule, names in a namespace cannot have more than one meaning, that is, two or more things cannot share the same name. A namespace is also called a context, as the valid meaning of a name can change depending on what namespace applies. Names in it can represent objects as well as concepts.

Each language is a namespace, whether it is a natural or ethnic language, a constructed language, the technical terminology of a profession, a dialect, a sociolect, or an artificial language (e.g., a programming language).

For many programming languages, a namespace is a context for identifiers. In an operating system, an example of namespace is a directory. It contain items which must have unique names. In the Java programming language, items that appear in namespaces have a short (local) name and unique long "qualified" names for use outside the name space. Also, some languages (such as C) combine namespace and names in a process called name mangling in order to eradicate ambiguity.

A simple example would be the name of a person. While in the namespace of a family the first name is enough to address a specific individual, you will need to include the family name (and/or an address or other related information) when searching for this persons phone number in a directory. Doe, John <> Smith, John.

Illustration

Within limited namespaces designed for your family, you might be named as "Charlie." Within a larger namespace containing strangers as well, the name "Charlie" might not be unique, so you are instead "Charlie Brown, 17 Main Street." In (the namespace of) a family, multiple occurrences of the name "Charlie" might be differentiated by suffixes such as "Sr" or "Jr".

Examples

 


From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.

Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: