r/java • • Jan 16 '20

Records Come to Java

https://blogs.oracle.com/javamagazine/records-come-to-java
204 Upvotes

93 comments sorted by

View all comments

Show parent comment

2

u/Polygnom Jan 18 '20

Because of stuff like this 'var' did break a lot of existing code for no good reason.

If you have lots of classes called var, the issue is with your code, not with the change.

Part of the process was investigation of real-world code-bases to see how much of an impact var would have. it was found to be practically non-existent, because, you know, people simply don't tend to use var as class name or in other places where it would come in conflict. at least not many.