News for hackers. Stuff that matters.
Re:Building Payments for an Insurance Startup by jfengel on Wednesday July 31, 2019 @03:53PM (#20577743)
Yes, exactly. That's the advantage. You need to display pounds different from yen and dollars and bitcoins. It's good to have the code say, "Whoops, I was only expecting dollars and cents, and I'm not prepared for this thing you handed me" rather than accidentally displaying the wrong thing.

At the very least I'd want the currency marked. And once you're representing currency as a structure/object rather than a bare integer, you've got a lot more opportunities to ensure safety.

There are no comments on this comment yet.