Getters vs. public final fields in records

Andrew Cave ajcave at google.com
Tue Aug 9 23:16:13 UTC 2022


>
> As a developer of IntelliJ IDEA static analyzer, I can assure you that
> supporting this case for records (when accessors are not overridden) was a
> pretty trivial improvement and took like a couple of hours to implement and
> test it.
>

Unfortunately, static analysis is not just something that your tool chain
performs, it’s also something that human beings reading code perform, and
for human beings I think the cost of double-checking that the accessor was
not overridden to do something unexpected is more expensive than it is for
IDEA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20220809/0acc5d82/attachment.htm>


More information about the amber-dev mailing list