3 ms·
Also `var` is such an important mitigatory for this in C# that it continues to astound me that some of the worst offenders also eschew `var` in C#. You really d
by WorldMaker 8y ago
Also `var` is such an important mitigatory for this in C# that it continues to astound me that some of the worst offenders also eschew `var` in C#. You really don't need the redundancy of `ImmutableSortedDictionary<string, Foo> localCache = new ImmutableSortedDictionary<string, Foo>()`, it's not some sort of Prolog assertion where the strict tautology makes different code than `var localCache = new ImmutableSortedDictionary<string, Foo>()`.
- kstenerud 8y agoThe problems start when you open code to see var localcache = cachemaster.cacheFor(foo); Now you have no idea what it is until you dig into the (hopefully correct) API docs, or use an IDE that can untangle things.
- guitarbill 8y agoI don't buy it. It's one jump to method definition away, which even an editor without IDE capability should be able to manage. But also, this is what dynamic languages look like, and people still manage to be productive. (I'll agree it can be a bit tricky with LINQ and anonymous types in C#, but I think `var` usage is worth that trade-off)