Namespace

From Free net encyclopedia

Image:Merge-arrows.gif It has been suggested that this article or section be merged with Namespace (computer science). (Discuss)


In general, a namespace is an abstract container, which is or could be filled by names, or technical terms, or words, and these represent (stand for) real-world things.

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 short and long names. The long name is for use outside the name space.

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

See also

Template:Selfrefde:Namensraum fr:Espace de noms it:Namespace nl:Naamruimte ja:名前空間 pl:Przestrzeń nazw ru:Пространство имён th:เนมสเปซ