Talk:Namespace (computer science)

From Wikipedia, the free encyclopedia

This article is within the scope of WikiProject Computer science, which aims to create a comprehensive computer science reference for Wikipedia. Visit the project page for more information and to join in on related discussions.
Start rated as Start-Class on the assessment scale
Mid rated as mid-importance on the assessment scale

I made some changes:

  • Generalized from "programming languages" -> "computer languages" since the discussion also applies directly to markup languages such as XML.
  • Added a few paragraphs at the top.
  • Replaced the "History" section by an "Emulating namespaces" section, because C is still very much alive. Also, I moved it to the end because we're primarily interested in explaining what namespaces are, not how they can be emulated.
  • Removed the plan 9 link, because it has absolutely nothing to do with namespaces and wasn't even mentioned in the text.
  • Added some other See-also links.

-- Eelis 14:24, 2005 May 22 (UTC)

Uh? Plan 9 has everything to do with namespaces! See [1] Lost Goblin 15:12, August 19, 2005 (UTC)
Agreed! See also [2] by Hans Reiser. (I think there was a link to Reiser4 which was deleted as well.) 71.246.25.169 10:59, 18 January 2006 (UTC)

I do not think your C examples are very good because you need to explain the use of static variables and functions within a module and the ability to set them via functions. The methods of resetting the error number in a multithreaded environment is an interesting example of this. Indeed some mention of a multithreaded enviroment and its impact on namespaces would be useful. Philip Baird Shearer 01:22, 23 May 2005 (UTC)

Are you referring to the C++ example or the Libpng example? In case you're referring to the C++ example: for what it's worth: it's not mine :). I wrote everything except the "use in common languages" and "xml" sections. I have no strong feelings about the "use in common languages" part.
W.r.t. threads, I don't really see how they are related to namespaces. As far as I know, using namespaces make just as much sense in single threaded and multi threaded programs, and they are used in the same way. Oh and a global error code variable is a bad idea regardless of threading and namespacing issues ;).
W.r.t. static variables and setting them through functions: these would really only show C++ features that are not particularly illustrative of namespaces as a concept. This is also the reason I have no strong feelings about code examples in the "use in common languages" part.
-- Eelis 01:32, 2005 May 23 (UTC)



[edit] Example of XML document

An example of a xml document usinfg namespaces might be good, should I add one?

--212.219.230.187 13:10, 9 February 2006 (UTC)

Yes! --Quasipalm 15:15, 9 February 2006 (UTC)

[edit] Merging with General Namespace article

I'm not sure I agree that this should be merged with the more generic Namespace article, since, although the underlying principle is the same, there are many nuances in the computer-science use of the term that do not apply to linguistics etc. I would, however, suggest a disambiguation page perhaps, or at least a disambiguation paragraph at the head of the generic namespaces article. Tom auger 14:35, 23 May 2007 (UTC)