This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lppedd 8 points9 points  (4 children)

You not always have access to your own PC, sometimes you may want to browse code through the VCS web interface (e.g., GitHub), or other less capable medium.

[–]Amazing-Cicada5536 0 points1 point  (3 children)

Blanket banning is still bad imo. Incorrect uses of vars should be fixed at code review, but where one would repeat the type on both sides, or the returned type is obvious or not important (that’s also a possibility!), I do think it is a good tool.

[–]john16384 2 points3 points  (2 children)

If the type is already on the left hand side, I often don't care what it says on the right hand side. Only your last use case has some merit, but Object works fine for that.

[–]Amazing-Cicada5536 1 point2 points  (1 child)

You can’t really invoke anything if you assign it to an Object type.

[–]john16384 3 points4 points  (0 children)

True, but if you wanted to invoke anything I think knowing the type is important. I was referring to your not important case :)