A namespace is an abstract container or environment created to hold a logical grouping of unique identifiers or symbols (i.e. , names). An identifier defined in a namespace is associated with that namespace. The same identifier can be independently defined in multiple namespaces. That is, the meaning associated with an identifier defined in one namespace may or may not have the same meaning as the same identifier defined in another namespace.

PropertyValue
dbpprop:abstract
  • A namespace is an abstract container or environment created to hold a logical grouping of unique identifiers or symbols (i.e. , names). An identifier defined in a namespace is associated with that namespace. The same identifier can be independently defined in multiple namespaces. That is, the meaning associated with an identifier defined in one namespace may or may not have the same meaning as the same identifier defined in another namespace. Languages that support namespaces specify the rules that determine to which namespace an identifier (i.e. , not its definition) belongs. For example, Bill works for company X and his employee ID is 123. John works for company Y and his employee ID is also 123. The reason Bill and John can be identified by the same ID number is because they work for different companies. The different companies in this case would symbolize different namespaces. There would be serious confusion if the two men worked for the same company, and still had the same employee ID. For instance, a pay-cheque issued to employee ID 123 would not identify which man should receive the cheque. In large computer programs or documents it is not uncommon to have hundreds or thousands of identifiers. Namespaces (or a similar technique, see Emulating namespaces) provide a mechanism for hiding local identifiers. They provide a means of grouping logically related identifiers into corresponding namespaces, thereby making the system more modular. Computer storage devices and many modern computer languages provide support for namespaces. Storage devices use directories (or folders) as namespaces. This allows two files with the same name to be stored on the device so long as they are stored in different directories. In some programming languages, the identifiers naming namespaces are themselves associated with an enclosing namespace. Thus, in these languages namespaces can nest, forming a namespace tree. At the root of this tree is the unnamed global namespace.
  • En programación, un espacio de nombres, en su acepción más simple, es un conjunto de nombres en el cual todos los nombres son únicos. Un espacio de nombres es un contexto en el que un grupo de uno o más identificadores pueden existir. Un identificador definido en un espacio de nombres está asociado con ese espacio de nombres. El mismo identificador puede independientemente ser definido en múltiples espacios de nombres, eso es, el sentido asociado con un identificador definido en un espacio de nombres es independiente del mismo identificador declarado en otro espacio de nombres. Los lenguajes que manejan espacio de nombres especifican las reglas que determinan a qué espacio de nombres pertenece una instancia de un identificador. Por ejemplo, Pedro trabaja para la compañía X y su número de empleado es 123. María trabaja para la compañía Y y su número de empleada también es 123. La razón por la cual Pedro y María pueden ser identificados con el mismo número de empleado es porque trabajan para compañías diferentes. Diferentes compañías simbolizan en este caso diferentes namespaces. En programas grandes o en documentos no es infrecuente tener cientos o miles de identificadores. Los namespaces (O técnicas similares como la emulación de namespaces) disponen de un mecanismo para ocultar los identificadores locales. Ellos proveen los medios para agrupar lógicamente los identificadores relacionados en sus correspondientes namespaces, haciendo así el sistema más modular. Muchos lenguajes de programación manejan espacios de nombres. En algunos lenguajes, como C++ o Python, estos identificadores nombrando espacios de nombres están asociados con un espacio de nombres que los agrupa. Así pues, en estos lenguajes, los espacios de nombres se pueden anidar formando un árbol de espacios de nombres. En la raíz de éste árbol se encuentra el espacio de nombres anónimo global.
  • En programmation, les espaces de noms aident à la construction de programmes modulaires. Par exemple, le symbole de fonction sin pourrait renvoyer au calcul d'une sinusoïde dans un espace de noms regroupant des fonctions mathématiques et au péché (le mot anglais sin en est une traduction) dans un autre espace de nom traitant de problèmes religieux. Cela évite les inévitables conflits entre symboles synonymes.
  • Un namespace, o in italiano spazio dei nomi, è - nella terminologia relativa all'informatica - una collezione di nomi di entità, definite dal programmatore, omogeneamente usate in uno o più file sorgente. Lo scopo dei namespace è quello di evitare confusione ed equivoci nel caso siano necessarie molte entità con nomi simili, fornendo il modo di raggruppare i nomi per categorie: attualmente il concetto di namespace è presente esplicitamente nell'XML e nel linguaggio di programmazione C++, ed implicitamente in altri linguaggi.
  • Пространство имён (от lang-en|namespace) - некоторое множество, под которым подразумевается модель, абстрактное хранилище или окружение, созданное для логической группировки уникальных идентификаторов. Идентификатор, определенный в пространстве имён, ассоциируется с этим пространством. Один и тот же идентификатор может быть независимо определён в нескольких пространствах. Таким образом, значение, связанное с идентификатором, определённым в одном пространстве имён, может иметь (или не иметь) такое же (а скорее, другое) значение, как и такой же идентификатор, определённый в другом пространстве. Языки с поддержкой пространств имён определяют правила, указывающие, к какому пространству имён принадлежит идентификатор (т. е. его определение). Например, Андрей работает в компании X, а ID (сокр. от lang-en|идентификатор) его как работника равен 123. Олег работает в компании Y, а его ID также равен 123. Единственное, благодаря чему Андрей и Олег могут быть различимы при совпадающих ID, это их принадлежность к разным компаниям. Различие компаний в этом случае представляет собой систему различных пространств имён (одна компания - одно пространство). Наличие двух работников в компании с одинаковыми ID представляет большие проблемы при их использовании, например, по платёжному чеку, в котором будет указан работник с ID 123, будет весьма затруднительно определить работника, которому этот чек предназначается. В больших базах данных могут существовать сотни и тысячи идентификаторов. Пространства имён реализуют механизм для сокрытия локальных идентификаторов. Их смысл заключается в группировке логически связанных идентификаторов в соответствующих пространствах имён, таким образом делая систему модульной. Операционные системы, многие современные языки программирования обеспечивают поддержку своей модели пространств имён: используют каталоги (или папки) как модель пространства имён. Это позволяет существовать двум файлам с одинаковыми именами (пока они находятся в разных каталогах). В некоторых языках программирования, идентификаторы имён пространств сами ассоциированы с соответствующими пространствами. Поэтому в этих языках пространства имён могут вкладываться друг в друга, формируя дерево пространств имён. Корень такого дерева называется глобальным пространством имён.
  • 命名空间(namespace)表示标识符(identifier)的上下文(context)。一个标识符可在多个命名空间中定义,它在不同命名空间中的含义是互不相干的。这样,在一个新的命名空间中可定义任何标识符,它们不会与任何已有的标识符发生冲突,因为已有的定义都处于其它命名空间中。 例如,设Bill是X公司的员工,工号为123,而John是Y公司的员工,工号也是123。由于两人在不同的公司工作,可以使用相同的工号来标识而不会造成混乱,这里每个公司就表示一个独立的命名空间。如果两人在同一家公司工作,其工号就不能相同了,否则在支付工资时便会发生混乱。 这一特点是使用命名空间的主要理由。在大型的计算机程序或文档中,往往会出现数百或数千个标识符。命名空间(或类似的方法,见“命名空间的模拟”一节)提供一隱藏區域標識符的機制。通过将逻辑上相关的标识符组织成相应的命名空间,可使整个系统更加模块化。 在编程语言中,命名空间是一种特殊的作用域,它包含了处于该作用域内的标识符,且本身也用一个标识符来表示,这样便将一系列在逻辑上相关的标识符用一个标识符组织了起来。许多现代编程语言都支持命名空间。在一些编程语言(例如C++和Python)中,命名空间本身的标识符也属于一个外层的命名空间,也即命名空间可以嵌套,构成一个命名空间树,树根则是无名的全局名空间。 函数和类的作用域可被視作隱式命名空间,它們和可見性、可訪問性和对象生命周期不可分割的联系在一起。
dbpprop:forProperty
  • Namespace
  • namespaces in general
dbpprop:hasPhotoCollection
dbpprop:package
  • java.lang
  • java.lang.reflect
dbpprop:wikiPageUsesTemplate
rdfs:comment
  • A namespace is an abstract container or environment created to hold a logical grouping of unique identifiers or symbols (i.e. , names). An identifier defined in a namespace is associated with that namespace. The same identifier can be independently defined in multiple namespaces. That is, the meaning associated with an identifier defined in one namespace may or may not have the same meaning as the same identifier defined in another namespace.
  • En programación, un espacio de nombres, en su acepción más simple, es un conjunto de nombres en el cual todos los nombres son únicos. Un espacio de nombres es un contexto en el que un grupo de uno o más identificadores pueden existir. Un identificador definido en un espacio de nombres está asociado con ese espacio de nombres.
  • En programmation, les espaces de noms aident à la construction de programmes modulaires. Par exemple, le symbole de fonction sin pourrait renvoyer au calcul d'une sinusoïde dans un espace de noms regroupant des fonctions mathématiques et au péché (le mot anglais sin en est une traduction) dans un autre espace de nom traitant de problèmes religieux. Cela évite les inévitables conflits entre symboles synonymes.
  • Un namespace, o in italiano spazio dei nomi, è - nella terminologia relativa all'informatica - una collezione di nomi di entità, definite dal programmatore, omogeneamente usate in uno o più file sorgente.
  • Пространство имён (от lang-en|namespace) - некоторое множество, под которым подразумевается модель, абстрактное хранилище или окружение, созданное для логической группировки уникальных идентификаторов.
rdfs:label
  • Namespace (computer science)
  • Espacio de nombres
  • Espace de noms (programmation)
  • Namespace
  • Пространство имён (программирование)
  • 命名空间
owl:sameAs
skos:subject
foaf:page
is dbpprop:redirect of