Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
filthyranter20883140dCTRL + 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!
Haxk2033767140dVar means variable. And should never be used. Use int for numbers and etc ffs
kaesaecracker238140dI 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.
Sully797140dNever dynamics. Never.
FetzenNET428140d@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.
matste476140dI 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.
Tayo442139dReadability 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
filthyranter20883123dUpdate to what my comment says:
I now use var on instantiated things like List<T>, as it says
var list = new List<string>();
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