Recently we got a new contributor on RSS Bandit who uses the ReSharper refactoring tool. This has led to a number of changes to our code base due to suggestions from ReSharper.
The author does not like the fact that ReSharper favors use of the var keyword in just about all cases. The examples given are interesting cases indeed. I can see where the results are less than clear because of this change.
With that said, I love the var keyword, and it is helping me to type less than every. In 99% of the cases there is no loss of clarity.
I think Dare's article provides a good read - however I don't agree with his conclusion and not just because you can get the type information by hovering over the variable wherever it is used (and not just in its declaration) at least by using said resharper
I blogged my opinion here http://www.rgoarchitects.com/nblog/2008/05/21/ShouldYouUseTypeInferenceInCVar.aspx
Comments
Pantuky replied ago:
The author does not like the fact that ReSharper favors use of the var keyword in just about all cases. The examples given are interesting cases indeed. I can see where the results are less than clear because of this change.
With that said, I love the var keyword, and it is helping me to type less than every. In 99% of the cases there is no loss of clarity.
Arnon Rotem-Gal-Oz replied ago:
I think Dare's article provides a good read - however I don't agree with his conclusion and not just because you can get the type information by hovering over the variable wherever it is used (and not just in its declaration) at least by using said resharper
I blogged my opinion here http://www.rgoarchitects.com/nblog/2008/05/21/ShouldYouUseTypeInferenceInCVar.aspx
Voters For This Link (12)
Voters Against This Link (0)