Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
CTRL + E, CTRL + D
automatically resolves any var keywords in my code to what they should be.
That way I can be lazy and have proper code!
Haxk202887915dVar means variable. And should never be used. Use int for numbers and etc ffs
I think using var in C#, the new Java versions and so on makes total sense. Why would you want to write
ArrayList<Type> list = new ArrayList<Type>()
... instead of
var list = new ArrayList<Type>()
With var it is way more readable imo.
Sully79815dNever dynamics. Never.
FetzenNET35415d@Haxk20 Yeah your right, let's just pollute the code with half a trillion redundant type declarations like this:
Dictionary<KeyValuePair<string, int>, List<Func<User, bool>>>
Instead of just using var. Real bright idea.
Or for example why would you use:
List<int> someList = new List<int>()
var someList = new List<int>()
It's so much more readable.
matste37515dI like watching Java developers being against this simple improvement. So many Aspergers and Stokholm syndrome victims.
You know what? It’s actually hard to find a modern, statically typed, oo language which doesn’t have variable type inference. Even C++ introduced it in c++11.
Tayo17415dReadability sure, I can get that. But I'd like to be 100% sure it's always the type I declare it to be.
It's a bit like the
discussion, all boils down to preference
Your Job Suck?
Take a quick quiz from Triplebyte to skip the job search hassles and jump to final interviews at hot tech firms
Get a Better Job