Talk:Namespace

Merge to namespace (computing) proposal
Is the word namespace really used in general like this article suggests it is? I thought it was more or less restricted to programming languages. Note that I am not saying the word couldn't or shouldn't be used in a more general context, I am just questioning whether it is or not already. If not, this is effectively primary research. Pcb21| Pete 00:14, 2 Jul 2004 (UTC)

Although Namespaces have strong applications in computer science to localize naming conventions, the term can be generically applied to most anything. Namespaces are even used inside the wiki system itself, as in the WoWWiki help files Help:Editing. Notice how I used a namespace to link to that. Tiranak 05:33, 24 April 2006 (UTC)
 * I completely agree; namespace is definitely a more general term. However, I would propose making a disambiguation link on the top of the page to the computer science term Metromoxie 01:54, 13 May 2006 (UTC)
 * Also, there hasn't been talk about this in a while, so I'm going to remove the tag in the next couple of days. Metromoxie 01:55, 13 May 2006 (UTC)

It's not restricted programming languages, but is is restricted to computing. Try finding it in any non-computing dictionary. Linking syntax in MediaWiki is a very poor example - it's a program! Try finding the term namespace used in any of the See Also links that aren't computing topics - it can be applied to those fields, but wouldn't be except by someone from a computing background. Also, C has no namespaces and no name-mangling. This article needs work. JonathanWakely 11:04, 2 November 2006 (UTC)

I also agree that the word namespace is restricted to computing. The paragraph which starts "Each language is a namespace..." is simply untrue. The same word can have several different meanings within each language. The example of family names as namespaces suffers from the same problem. I propose this article be redirect to Namespace (computer science). Mikecron 17:46, 18 April 2007 (UTC)

I take issue with the definition: the idea is to allow the same name to be reused in several different ways without ambiguity. Given the alphabet {a,b,c,...,x,y,z}, an infinite number of unique names can be generated, but only a few are used regularly, such as the letters {i,j,x,y,..} because long names are impractical. A prefix (or suffix), taken from the alphabet, creates a new set of names and disambiguates all names between the two. For example, the prefix 'aa' added to {i,j,x,y} becomes aa:{i,j,x,y}, which is distinct from {aai,aax,aay} and {i,j,x,y}. However, the prefix (or namespace), is itself a name in the original name set and similarly subject to regular use, such as {Help, Category, Template}. By creating a meta-namespace, such as 'bb', the same namespace 'aa' can be reused as bb:aa:{i,j,x,y}, which is different from bb:{aai,aaj,aax,aay}. It should clear that a file's path defines its unique namespace (e.g. /foo/bar/widget/) and all filenames in that namespace (i.e. directory) are unique. Similarly, a person's lineage can also be considered a namespace, although personal names are inherently ambiguous.

Namespaces do not provide context, it follows from uniqueness. Although the name  maybe used in both the global and   namespaces, they are completely separate entities. So  is not   used in the 'aa' namespace, but another item entirely, regardless of whether they are equal, similar, or different to each other. (PeterMG 20:54, 5 May 2007 (UTC))

I'd say this article is more than justified as whether or not the term "namespace" is only used in the computer sciences today or not it refers to a good and useful concept well adaptable to use outside the field. As taxonomy is correctly mentioned as an example of a field which uses this logical construct I feel there should also be an example of this and that example should be of Homo Sapiens Sapiens where the first instance of "sapiens" in the name refers to the species and the second to the subspecies of the animal in question. Of course if anyone knows of Ontology or Taxonomy terms with a similar meaning links to those would be very good too. Wiki-BT (talk) 02:20, 29 March 2009 (UTC)

This is an old merge discussion now... personally I can see it being used in other contexts too, so am removing the tag from article. Lee&there4;V (talk • contribs)

Namespacing articles
What does it mean to nominate an article for namespacing? - Rockmandrum (talk) 19:47, 20 June 2010 (UTC)
 * If you're talking about Wikipedia articles, that's a question for WP:NS. --81.178.31.210 (talk) 12:27, 6 August 2010 (UTC)

namespace vs container
What is the difference between a namespace and a container? Is a container that can be used qualified providing a namespace (e.g. struct and directory), or are they excluded from the definition.

I also think the namemangling remarks should be removed. If only since it is not clear what the exact name is (instance name or type name). Mangling uses the typename, while when qualifying the hierarchy (x.y.z) in the source the instance name is used. 88.159.64.210 (talk) 16:03, 10 May 2011 (UTC)

Wikipedia namespace example
There should be an example dealing with Wikipedia's namespacing conventions. Not as a WK edition tutorial (does not belong there), but as an example more evocative to WK users than this or that programming language. Why describe, say, C++ and Java, but not Wiki ? Thierry Le Provost (talk) 10:00, 22 May 2013 (UTC)

Discussion of namespaces in C++
I made a few edits to the text of this section. The previous text did not do a good job of differentiating between the English word "using" and the C++ "using" directive. In particular, I removed the statement: "Bjarne Stroustrup, designer of C++, has said himself that using namespaces is unsafe and wished he had not included it in the language." As written, that is almost certainly inaccurate, and at the very least it is uncited.

For starters
The for starters section is fairly convoluted, and i would say the XML example shown is certainly not for starters. Would anyone object to me removing it? Gsonnenf (talk) 06:33, 24 June 2015 (UTC)

prefixes
Why does the "solution via prefix" subsection, under Name Conflicts, suddenly mention Civil Engineering and Electrical Engineering, and then An Engineering College? Shouldn't it simply repeat the html table's information (Apples and Bananas) and then the furniture 'table' section (African Coffee Table) but with prefixes? Am I missing something? — Preceding unsigned comment added by Jayache80 (talk • contribs) 01:04, 12 March 2016 (UTC)

C language example
Is the C language example in the article appropriate? I thought that the primary usefulness of namespaces in programming was to allow abbreviated identifier names based on the context. The C example using structures does not accomplish this. Michael9422 (talk) 18:57, 26 August 2016 (UTC)

I don't believe it's appropriate. namespaces in programming languages are distinct from objects; namespaces are a compile-time construct, while objects are a run-time construct. 13:47, 13 May 2017 (UTC) — Preceding unsigned comment added by 73.109.28.98 (talk)


 * OK, I removed it. Michael9422 (talk) 19:23, 26 June 2017 (UTC)

Computer science considerations
In this section, there is the sentence:

"Namespaces (or a similar technique, see Emulating namespaces) provide a mechanism for hiding local identifiers."

I would say, instead, that they allow abbreviations for unique, non-local or global identifiers. Michael9422 (talk) 19:00, 26 August 2016 (UTC)

Emulating namespaces?
I am skeptical of the section called "Emulating namespaces". It seems a bit like revisionist history to me. The problem of excessively long identifier names in order to avoid global name conficts is the problem that motivated the invention of namespaces, isn't it? Could we just as well say that namespaces are emulating the choice of clear, hierarchical, and unique global variable names? Which came first? Michael9422 (talk) 02:04, 27 August 2016 (UTC)

criticism
There are criticisms of namespaces that might deserve mentioning in the article, perhaps in a new section. For example, see "Why I Hate Namespaces", by Danny Kalev: https://web.archive.org/web/20160709115609/http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=286 In the article, he says that adding namespaces to C++ was a mistake. Michael9422 (talk) 19:03, 26 August 2016 (UTC)


 * Nevermind. I was not aware that there is already a wikipedia article called ADL (argument dependent name lookup), and it covers this. Michael9422 (talk) 15:00, 28 August 2016 (UTC)

External links modified
Hello fellow Wikipedians,

I have just modified 3 external links on Namespace. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
 * Added archive https://web.archive.org/web/20100728202945/http://paul.rutgers.edu/cs545/S06/papers/adya-farsite-osdi-2002.pdf to http://paul.rutgers.edu/cs545/S06/papers/adya-farsite-osdi-2002.pdf
 * Corrected formatting/usage for http://tutorials.csharp-online.net/index.php?title=CSharp_FAQ%3A_What_is_a_namespace
 * Corrected formatting/usage for http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=286

When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.

Cheers.— InternetArchiveBot  (Report bug) 14:51, 29 April 2017 (UTC)

Introduction
The introduction reads badly to me. Why does the second sentence refer specifically to Java? "In Java, a namespace ensures that all the identifiers within it must have unique names so that they can be easily identified." That seems to be getting specific too quickly. Couldn't we just say "A namespace requires that all the identifiers within it have unique names so that they can be easily identified."? Zaddikskysong (talk) 02:23, 14 July 2019 (UTC)

The Link for Citation #9 is No Longer Available
If you go to the provided link, it goes to an website that asks for one to buy the domain and doesn't provide any corrobating evidence to the article or statement. Just letting people know.

Here is a capture of the linked website when it was still active: https://web.archive.org/web/20131020153832/http://tutorials.csharp-online.net/CSharp_FAQ:_What_is_a_namespace — Preceding unsigned comment added by User:MatthewTh0 (talk • contribs)

✅ --KAP03(Talk &bull;&#32;Contributions &bull;&#32;Email) 05:12, 9 August 2019 (UTC)

Oops, I thought it was just that spaces weren't there so I added spaces to your edit and put dead-link=yes. I'm sorry if that is bad, feel free to undo. — Preceding unsigned comment added by User:MatthewTh0 (talk • contribs)

Namespace in C#
Hello,

Welcome to c-sharptutorial.com. I am Shahzad Aslam. I am the founder of c-sharptutorial.com. I'm currently living near Islamabad. I did my BSCS in 2010. I have 13 years of experience in Dot Net and its supporting technologies. I like playing games, especially playing cricket. At the time of my career, whenever I was working on my computer, I had a feeling of a lack of neat, clean tutorials on the internet. Mostly, the tutorials I read were congested. Whenever I open a tutorial about a specific topic, it always has a lot of congested content. I often think there should be websites that do have more clear and easily readable content, and many times, when I searched for a topic on the internet, it was not found on the internet. At that time, I was thinking that there should be a website that covers topics that I did not find on the Internet. So, to accomplish this dream, I set up the foundation of c-sharptutorial.com. I recently written an article in my website about Namespace in C#. Please add this link in your wikipedia article.

Sincerely Shahzad Aslam ShahzadCSharp (talk) 10:34, 2 March 2024 (UTC)