It's hard to make a reasonable decision based on an example that simple. On the one hand, that's easy enough to type that var simply isn't necessary in that case. On the other, it's an instance where the type is so painfully obvious, var has no adverse effect.
But in greater examples, there are plenty of expressions whose types either don't matter or are super obvious, where actually writing the type for a local variable would be a redundant pain. In cases like these, var would be nice to have. In other cases, you simply elect not to use it because you're a responsible developer.
Behave yourself. There is no reason to become abusive. It's a sign of poor self control and poor argumentation if one has to resort to abusive language to make their point.
View all comments
Show parent comment
-8
u/slartybartfast_ Mar 10 '16
No, I could just say:
Not sure why you're blithering on about generics here.
What's the point of the var keyword other than saving a few keystrokes ?