logoalt Hacker News

denismenaceyesterday at 11:28 AM4 repliesview on HN

> but it'll bite you incredibly hard if you ever stumble upon an edge case such as working with a partner that has a different implied number of digits for a given currency

Why would that be a problem? You just transform the values when interacting with their API.


Replies

xliiyesterday at 12:07 PM

Exactly, model is in integers and representation can be 1⃣3⃣ or whatever, that's why model-view separation exist.

show 1 reply
afavouryesterday at 2:26 PM

Because a lot of the time there won’t be any error when you’re wrong, just silent data loss.

show 1 reply
microgptyesterday at 1:33 PM

Customer was charged $0.995 after fees, how to represent in your data model with integer cents?

show 4 replies
lxgryesterday at 11:29 AM

Sure, but are all your (and your users' and vendors') engineers and LLM agents going to remember that? When in doubt, always be explicit.

show 1 reply