17
Comments
  • 1
    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!
  • 3
    Var means variable. And should never be used. Use int for numbers and etc ffs
  • 7
    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.
  • 2
    Never dynamics. Never.
  • 5
    @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>()

    Instead of

    var someList = new List<int>()

    It's so much more readable.
  • 1
    I 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.
  • 0
    @FetzenNET you know im C developer. Var just seems fucked up to me. If you like it the great.
  • 1
    @Haxk20 I know where you come from, when I say a first intro to var I too was like "Yeah I'm not gonna use that". But now I can't live without it:)
  • 1
    Readability 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
    Func() {
    }
    vs
    Func()
    {
    }
    discussion, all boils down to preference
Your Job Suck?
Get a Better Job
Add Comment