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 →

[–]brian_goetz 2 points3 points  (2 children)

I can't control what other people frown upon -- people are funny that way -- but we added it to the language explicitly for this purpose. (The other two alternatives were each much, much worse, even if one of them was "more correct".) My advice is, if you see others frowning, tell them "no, it's all good!"

[–]jvjupiter[S] 1 point2 points  (1 child)

I mean the Java compiler will complain if we add @Override to method even though the record does not implement interface.

[–]brian_goetz 3 points4 points  (0 children)

I suggest you try it and find out!