Namespace
From Wikipedia, the free encyclopedia
- This article is about namespaces in general. For their use in computing, see Namespace (computer science).
- In Wikipedia, namespaces may refer to Wikipedia: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 contains 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 person's phone number in a directory.
[edit] See also
- Binomial nomenclature (genus-species in biology)
- Chemical nomenclature
- Dewey Decimal Classification
- Digital object identifier
- DNS names (Internet addresses)
- IP address
- Library of Congress Classification
- Category:National identification numbers
- Star catalogues and astronomical naming conventions
- XML Namespaces
- 10-Digit Zip Codes