Why do you use C#? Is it just because that’s what you where told to use? Are you one of those that hates VB.net with out any reasons other than, “its what hobbyist coders use”?.
I have a feeling there are some people that just don’t "get it". Unfortunately Jeff Atwood seems to be one of those. I have been reading his blog for years and he frequently brings up great points ideas and thoughts about software in general.
Unfortunately I have to strongly disagree with the path of one of his recent blogs: Department of Declaration Redundancy Department
To me that is "var abuse". If you are using C#, IMO, you should be using it as a statically typed language and use feature like var as a get out of jail free card when it is needed, or will provider significant "value add".
Using it everywhere make your code weak, in the world of C#.
If you want to use a dynamically typed/inferred language, use one! Don’t try to bend a statically typed language in nasty ways to do your work for you.
My major concern real here is maintenance. Introducing var as common place syntax means you are diluting two worlds. Coding standards may go by the way side for no reason other than, "I can use var so I will use var".
The irony is the people that say "yeah i use var all the time" are often the ones that say, "yeah but i would never use vb"..well why not?
My original reply:
comment like :
"Agreed. I use var all the time. It could be even more concise if they dropped the 'var'"
Make me ask: "Why are you coding in C#?"
Find a language that supports what you want! Try Iron python if you what to stay on the CRL/DRL.
I am keeping my "IFoo foo = new Foo();" syntax, thank you very much.
It concerns me that C# is trying to be the everything language. I give it about 3 years before no one whats to code in it anymore due to the lines be sooo blurred.
Use C# how is it supposed to be used, then use Boo, Iron python etc for more dynamic approaches.