IDE tells you that. Documentation/go to definition tells you that. In most cases it's irrelevant anyway (obvious from use when reading or intellisense when working on it)and it's just noise.
And don't even try to argue "what about people who don't use an IDE" - sorry but if your editor doesn't support features mentioned above (and even Vim does) it's not fit for development with these languages - their highest value proposition is powerfull tool integration.
I don't want to have to move the mouse over the var keyword or something like that. Also I have tried that empirically with interns. While it is true that interns are far worse than experienced programmers I have seen them make a bunch of mistakes from not knowing the type of the variable under var (most often IEnumerable vs IQueryable and examples like the one I gave). They wrote the code and a week later I ask them to tell me the type of the variable without pointing with the cursor and they fail. The real problem is they don't even know they have to look it up otherwise there would be no bug to begin with.
I've seen non-interns make the same mistakes. Types should not be hidden from view. I use an IDE as my crutch when doing spaghetti maintenance, but I'd much rather be able to kick the crutch away.
I don't claim that only interns do this I just point out that I have empirical observation. Even if only the most junior programmers are confused by hiding types it is still worth to leave the types there.
-1
u/[deleted] Mar 10 '16 edited Mar 10 '16
IDE tells you that. Documentation/go to definition tells you that. In most cases it's irrelevant anyway (obvious from use when reading or intellisense when working on it)and it's just noise.
And don't even try to argue "what about people who don't use an IDE" - sorry but if your editor doesn't support features mentioned above (and even Vim does) it's not fit for development with these languages - their highest value proposition is powerfull tool integration.