Fabio Franco wrote:
Do you really think that Ctrl+C, Ctrl+V is a painful typing exercise. Better yet, do you really think that, Ctrl+C, Ctrl+V is too much for the sake of readability? Most C# people look at the beginning of the line to verify a type (or a base type/interface). Having a var there will not help at all when one is quickly sweeping the code.
Ctrl+C, Ctrl+V and jumping around... come on, it still disrupts the flow and is quite a PITA. Sweeping, well, depends on how quickly, I guess, since my IDE shows the type of a variable when hovering the cursor over it, which happens to be where I read when scrolling. There are languages which don't have something like LINQ but do have automatic type inference, so a lot of people seem to disagree here what such a feature is good for or isn't. But yeah, I can see how that can be annoying - I have the problem with code where people put the opening { brace at the same line instead another one :-D I hate it when I can't identify scope by looking at the exact same column, but have to search for it in variying line widths... With my usual assignment style var use, though, the type is still quite to the left - if there is a very long variable name, I might put the type in the next line, a bit intented.
Fabio Franco wrote:
You don't use dynamic keyword for types known at compile type, do you?
Huh? Var is not dynamic. Bad example? Exactly *because* the type is known at compile time, I do use var in assignments!
Fabio Franco wrote:
Somethings are there for a purpose, so that's what we should use them for
That sounds quite like a priest, talking dogma, not to be questioned. If something turns out to work quite nicely for something else than original intention, why not use it? That something was not originally envisioned to be use for something, alone, is not an argument at all, for refraining from using it that way.
Fabio Franco wrote:
Do you use a hammer as a screwdriver? You could bust something open, but I'd rather not brake it while doing so.
I have not seen an example of this var use busting something open, other than you personally can't read the code as quickly.
Fabio Franco wrote:
OriginalGriff has more experience than both of us combined, i