News for hackers. Stuff that matters.
Re:Kotlin Money by vintagedave on Tuesday October 08, 2024 @01:27PM (#41779669)
Delphi has a currency type, as does C++Builder (so, a native Currency type available in C++ with that toolchain.)

This one seems to carry units, as in, it is not a type with math for a known amount of fixed point precision that differentiates this library, but that it captures that plus the unit -- the currency, USD, EUR, etc -- that it is in.

Re:Kotlin Money by eriksencosta on Tuesday October 08, 2024 @02:32PM (#41780346)
You are right. Languages indeed have support for currencies and decimal numbers. My implementation is based on Fowler's Money pattern. The Money object is thus a value object representing a monetary amount in a given currency.