I am considering using a character with a diacritical mark (e.g., ō) in a namespace for a custom framework. This idea has come up as a way to distinguish a product, but I want to to be sure this isn't a bad idea, and if there is anything about it that will come back to bite me later. I have not seen other examples of namespaces that use special characters in my searching, nor any similar discussion on this topic, which gives me pause in continuing down this path.
I was initially considering naming the assembly with a diacritical mark as well, but the first showstopper I ran into was in trying to digitally sign the assembly. I could not get the special character to appear in the command prompt, so I got a No valid input error. Perhaps there is another workaround for this?
One gotcha I realize is that it makes typing out the namespace in Visual Studio more challenging. I'm not seeing this as a major issue, however, since the character will come near the end of the word I am using, the word will be rather unique, and with IntelliSense this shouldn't be too big of a problem.
Consider the following example, contained in assembly Macron.dll:
namespace Macrōn.Library
{
public class MyLibrary
{
public string MyProperty { get; set; }
}
}
There appears to be no issues with generating and using this Macron.dll, and there are no issues distinguishing this example Macrōn.Library namespace. The file, folder, project & solution names Macrōn do not seem to cause any issues, and everything seems to jibe with source control without any issues.
Any other considerations or things I am missing when using a diacritical mark in an assembly and namespace? Any thoughts on getting around my issue signing the assembly? Is this approach bound to fail? Is it really just not worth implementing, as it may be confusing or otherwise difficult/obscure to use?
This will turn into a lot of work to undo later, so I want to know if I'm shooting myself in the foot before I get too deep into this.
Thanks.
I want to to be sure this isn't a bad idea, and if there is anything about it that will come back to bite me later.
It is valid. Many obfuscators change namespaces / types to have unicode characters, some of them even non-printable, to make reverse engineering more difficult.
That being said, if this is a public framework that others will consume, I'd discourage it. That would force anyone using the namespace to save their source file as Unicode / UTF8, and if they don't, the ō character will likely be replaced with a ?
. Then it'd no longer compile.
Alexei made a very good comment as well. I have no idea how to type the ō character other than copy and paste it. That would certainly slow me down.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With