logoalt Hacker News

portlyyesterday at 12:26 PM2 repliesview on HN

Storing numbers as arrays of u8? That doesn't make sense


Replies

ivanmontillamyesterday at 1:01 PM

For JSON serialization, which doesn't support fixed-point precision it does.

Floating-point precision has too many gotchas for being suitable to store Decimal types, especially for the Currency use case.

show 1 reply
lxgryesterday at 1:36 PM

It makes a lot of sense if you value correctness over performance.

show 1 reply