Lurker News
Manipulating monetary amounts is a common computing chore. However, no mainstream language has a first-class data type for representing money, it’s up to programmers to code abstractions for it. This isn’t an issue per se until dealing with rounding issues from operations like installment payments (e.g., buy now, pay later), foreign exchange, or even simple things like fee processing and tax collection.

Inspired by my days at N26 Brasil dealing with these challenges, I introduce Money: a Kotlin library that makes monetary calculations and allocations easy.

Comments (228) 50 threads

Show all comments

Showing thread 45 of 50

shortrounddev21 reply#
> However, no mainstream language has a first-class data type for representing money

This is literally the entire point of COBOL

millerm2 replies#
"no mainstream language..." COBOL is has not been a mainstream language for many decades now.
wiether1 reply#
It's still quite mainstream in domains where they manipulate a lot of money : banking/insurance.

The core systems of many old institutions still relies heavily on COBOL.

eriksencosta#
I think I will add a footnote on COBOL. COBOL is huge in Brazil, lot of insurance/financial companies are still using mainframes.
throw16180339#
There are billions of lines of COBOL in production. It's not going away any time soon.