Wrong. Hover over var and you see the type ;)I see everything wrong with using var for simple data types. It makes your code far harder to read (as you cannot see the type the object is or what the function you call returns), it basically throws away half of the readabillity, documentation and maintainbillity of your code. C# is supposed to be a strong-type language, but when some dickhead over at Microsoft (I'm sorry Microsoft, but sometimes you really make some dumb ass decisions) came up with the idea of var. As a result of this, half the example codes over at MSDN looks Javascriptified and is way harder to read if they took their time to write int instead of var. It really annoys me when people says programmers are lazy. We are not. We are supposed to write code which other humans shall be able to effectively read, extend, modify and maintain. At the same time we shall write comments in our code and at least a dozen reports on how we decided to design and implement this and that. If you don't take your time to write self-documented code that is both easy to read and understand, you make a hell not only for yourself when you are going to maintain your code, but also for those "dumb-ass next generation kids" who are going to figure out what your code does in ten years.
I'm clearly not a fan of weak-type languages and I only think they should be used for scripting purposes and not programming larger systems (like those hipsters who wants to run JavaScript server-side). I have been working on a school project in PHP and JS for about a month now and much of the documentation goes to describe what type this variable is. And when you in addition to your code specify what type this variable is, or what this function returns - I don't really see why the language is weak-type. I have been sitting for hours going through the layers in my web-app to find a bug, which turned out was that I managed to mix up a function parameter with a local value. So, yeah....
TL;DR: Good programmers aren't lazy and weak-type languages sucks.
Also, Mextur, don't use "continue;", it creates more exit-points for your foreach which makes it harder to read. break, return and continue are all considered as bad practice when used in foreach where they can easily be avoided by using normal if-statements or adding conditions to a while statement.





