I'm tasked with choosing a name that will in effect be the internal name of our architecture. I'm taking this responsibility seriously, as I have worked with a lot of "bad" namespaces and don't want to inflict one on others.
What makes a "bad" namespace to me?
In terms of human factors:
DDL
, MOS
, etcOffice
or Text
or IO
Vancouver
and so on.
I feel comfortable choosing a namespace in terms of descriptive ability and mnemonic. I'm wondering what the technical consequences of namespace names can be. For instance, what problems might arise from the namespace _
, which is a legal C# namespace name? What about a single letter, like e
? Are there namespaces that give CodeDom or Reflector fits? Do some namespaces that are legal in C# cause problems in other .Net languages? Is it possible to choose a namespace that is not Mono-compliant for some reason? Have you worked with a namespace that made your life difficult for reasons involving the compiler or Visual Studio or the Windows (or Linux) filesystem?
Thanks for reading and thanks in advance for any help!
For non-technical stuff, read the Frameworks Design Guidelines. They have lots of good advice. Briefly:
There is a lot more good advice in the guidelines that I have not reproduced here. Go read them.
However, it sounds like you've got the non-technical stuff down. One of the bits of advice in the guidelines is "do not name a type the same as its namespace". That is good advice not just because doing so is confusing to readers; there is a good technical reason as well.
For the technical reasons why naming a type the same as its namespace is a terrible idea, see my articles on the subject:
https://web.archive.org/web/20120111133911/http://blogs.msdn.com/b/ericlippert/archive/2010/03/09/do-not-name-a-class-the-same-as-its-namespace-part-one.aspx (At least as of January 2020, this is only available on archive.org.)