Follow

Me: How do I work with currency?

Ruby: Just use BigDecimal.

JS: Deal with floating point math edge cases on every operation you do, forever.

@ioquatix Thanks for sharing! I'll keep it in mind for future work. My current project deals only with local clients, so my only real currency-related needs are "Don't give me unexpected floating-point rounding errors."

It looks like you're doing real work, whereas I'm just happy to be using a language that doesn't suck at basic math. 😂

@brian_kephart Yeah, I use it in a couple of projects, including github.com/oriontransfer/finan which is a crazy git-based financial management/invoicing system.

Sign in to participate in the conversation
Ruby.social

A Mastodon instance for Rubyists & friends