Namespace
Encyclopedia : N : NA : NAM : Namespace
- In Wikipedia, namespaces may refer to [Namespace]
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
- Binomial nomenclature (genus-species in biology)
- Chemical nomenclature
- Dewey Decimal Classification
- Digital object identifier
- DNS names (Internet addresses)
- IP address
- Library of Congress Classification
- Star catalogues and astronomical naming conventions
- Javascript Namespaces
- XML namespaces
- 10-Digit Zip Codes
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.
