logoalt Hacker News

morpheuskafkayesterday at 2:48 PM1 replyview on HN

I'm sure there is something I don't know here, but how is working with integers "brittle"? The only issue I see is rounding down by default, not sure if that is even an issue or not. At any rate, it seems a lot less brittle than floats or bigdecimal style number classes.


Replies

lxgryesterday at 2:56 PM

The brittleness comes from the fact that the number of implied decimal digits per currency isn't always well-defined across all stakeholders and systems.

If you're only working in a single currency, there's usually no issue.

show 1 reply