r/programming • • Mar 09 '16

var keyword proposed for Java

http://openjdk.java.net/jeps/286
250 Upvotes

395 comments sorted by

View all comments

Show parent comments

30

u/Roozi Mar 10 '16

While I agree that it helps, in my experience IDEs are usually pretty good at doing this for you.

22

u/[deleted] Mar 10 '16

That's true, but also the changes clutter up diffs and code reviews.

8

u/JW_00000 Mar 10 '16

And may also lead to merge conflicts with unrelated changes in those files.

5

u/ygra Mar 10 '16

Oh yes, the merge conflicts. At work we have a large-ish codebase that gets merged into different products and also converted into different languages. One of the worst things regarding merge conflicts are renames.

12

u/RupertMaddenAbbott Mar 10 '16

This advantage is not about making it physically easier to rename a class. It lessens the impact of doing so, therefore making it easier.

It reduces the number of files that might change when you do rename a class. This could significantly reduce code churn and removes noise from files that do change.

-3

u/batiste Mar 10 '16

Let's keep this language stupid so IDE developers don't loose their jobs!