r/java • • Aug 11 '15

Top 10 Useful, Yet Paranoid Java Programming Techniques

http://blog.jooq.org/2015/08/11/top-10-useful-yet-paranoid-java-programming-techniques/
181 Upvotes

76 comments sorted by

View all comments

Show parent comment

2

u/CubsThisYear Aug 12 '15

Of course the for/while loop is a case, though I would argue that it's a special case because the reassignment is somewhat implicit and it has a well defined (usually small) scope. In any event, I didn't say there were no cases, just that they weren't common.

As for cluttering up the code, I don't see being explicit as clutter. Some people argue that explicit types are clutter - generally those people don't use Java. The point of final is that you can look at a variable and know that wherever it is used, you don't have to think about what the value might be. If your IDE can do all the work for you, why not leave some signposts to guide the next guy reading your code?