improve my => 'code' 
I was just reading Jeff Atwood's recent blog article
Department of Declaration Redundancy Department
He makes the case that writing code without static typing is easier to read, and "Anything that
removes redundancy from our code should be aggressively pursued -- up to and including switching languages."
My take is "maybe".
Say I have a class named Example that implements two interfaces, IFoo and IBar. When I instantiate I have several options when dong so statically.
Example example1 = new Example();
IFoo example2 = new Example();
IBar example3 = new Example();
In the second case I am ensuring that example2 implements a certain interface, and I can swap this out with an instantiation of a different object that implements IFoo. This strategy pattern is fundamental to object oriented programming, and 'getting in the habit of writing code using var' can provide inflexible suboptimal design. Additionally, if you are coding using
TDD (Test Driven Development) you won't be able to write unit tests that remove all dependencies for your class unless you write your dependencies as interfaces.
The way the compiler in
C# 3.5 automatically converts
LINQ queries to IEnumerable objects is nice. But the following statement
var reader = new StreamReader(fileName);
is cast to the child static type, not to the its abstract parent (as I think it should be).
Interested in your thoughts.
Jonathan