It will arrive sooner in Java than in C#. Sad for the C# state of affairs. Way to go Java!
I can’t get over the fact they used a double for the currency conversion. Even if it might be fine in this example (I think it’s not) it’s highly confusing.
Does Java have a “native” decimal type?
There is java.math.BigDecimal class in the standard library.
Thanks! I’m a Java n00b.
It is not relevant to the topic of the article, but yes, it is almost certainly wrong.
It is nice, but maybe even better it would be to officially allow annotation preprocessors to modify the classes, so it will be possible to do this (like does Lombok in a dirty way) and even more (it would be a generic solution, not only single-purpose for records/pojo).