Recently I read an article from Jeff Atwood, where he basically claimed the brevity leads to better code. Personally I think his example he gave:
if (s == String.Empty) if (s == "")
Is just plain wrong, and this is the comment I put on his website:
I think this is a very bad example using “” and String.Empty. Because essentially “” is a magic number of sorts, I am talking totally theoretical here, I know that “” is never going to change from representing a empty string, but what happens when developers start using “\n\r” instead of Environment.NewLine, not only does it cause a problem if you move to Mono on Linux it also requires a higher knowledge level to understand what “\n\r” means and you even have to remember what order it goes in.
It is good practice to get developers thinking that magic values such as “” and “\n\r” and any number is not the right way to code. Because if you tell them it is okay to use “” then why is it not okay to use 3.14F for PI instead of using Math.Pi?
It’s all about staying consistent and having the least amount of rules as possible, that is how you keep code simple across your organization.
Also by your same logic a developer should never use VB.NET because the language is way to verbose. I personally am a C# developer, but if a person is more productive in VB.NET and it meets the requirements for the project who am I to tell them they should use C# because it is less verbose.
.Net, .NET, Better Coding

Funny idea. Neither thought using Integer.ZERO instead of 0 on the principle that it may be more general. For PI, well, you just cannot write it down with a finite set of digits, so it make more sense however for a completly different reason – anyway I don’t think PI definition will change soon!
No Pi won’t change, but if I just start multiplying things by 3.14 all over my code that could be PI or it could be the weight of my hamster, either could be true. Plus some engineer in .NET went out of his way to generate properties like String.Empty, Environment.NewLine, Math.Pi, etc, so the least I can do is use them.