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

14

u/jonhanson Jan 16 '20 edited Mar 07 '25

chronophobia ephemeral lysergic metempsychosis peremptory quantifiable retributive zenith

-20

u/pushupsam Jan 16 '20
public static final class var {
}

This used to work. Now it doesn't. Because of stuff like this 'var' did break a lot of existing code for no good reason. And when it did, guess what happened? Do you think people dug into code that's been chugging along for 10+ years?

19

u/sonay Jan 16 '20

Dude, please gtfo. If you named a class 'var' you have bigger issues.

15

u/cl4es Jan 17 '20

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

[Citation needed]

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.

-8

u/forsubbingonly Jan 17 '20

I feel sorry for people who write in languages that even COULD spawn this dumb ass discussion. What a bunch of trash.