r/java
•
u/loicmathieu
•
Jul 23 '26
•
1
JEP 540: Simple JSON API (Incubator)
https://openjdk.org/jeps/540
79
Upvotes
View all comments
Show parent comment
3
u/ThinkPreparation8975 Jul 24 '26
Don't forget about unitless numbers, of which there are plenty - rate, percent, factor, even ratio (how do you express 1/3?).
And why would you suffer with modeling decimals with a long and a byte yourself, when the Java library has already solved this problem for you?
BigDecimals are ubiquitous in most financial circles. I don't know about HFT, but for banks' middle- and backoffice they are the obvious choice.