To read all comments associated with this story, please click here.
That's hard to say, I think that var will make code shorter to read so this should help maintainability.
Now OTOH, there could be instance where a type error could be hidden due to var so it could also reduce maintainability. But with *local* type inference I expect that those case will be rare.
IMHO this is a plus, unfortunately Limbo, Scala (other language where there is local type inference) programmers are rare so it's difficult to get a feedback.
>That's hard to say, I think that var will make code shorter to read so this should help maintainability.
I can see one case where this doesn't hold. Something like
var variable = ueberMega31337Function( arg1, arg2, ..., argn );
Tell me what kind of a variable does that return without searching for that functions definition.






Member since:
2005-07-06
I can see how the "var" keyword can save time during programming.
However, one hopes that a piece of code is written only once. After that, it has to be maintained, modified, upgraded, etc.
For the life of me, I can't see how "var" does not hurt the maintainance of code. I agree completely with those who say it makes the code less readable.
Even if it is designed for a special circumstance (LINQ), and even if it is immensely useful for that purpose, people are now presenting it as a general-purpose construct that saves the creator time.
If this is the situation now, imagine the result when abuse sets in.
Am I wrong?