Re:Kotlin Money
by rebeccaskinner on Tuesday October 08, 2024 @12:45PM
(#41779261)
Neat. It seems to me like this is filling three separate gaps:
I'm curious if Kotlin's type system is expressive enough to allow you to catch at compile time cases where you might be trying to, e.g. add USD to GBP.
[ Parent
| on HN ]
Re:Kotlin Money
by eriksencosta on Tuesday October 08, 2024 @02:43PM
(#41780432)
The library will throw an exception if doing an operation with different currencies: https://github.com/eriksencosta/money/blob/trunk/money/src/t...
But I think I'll make it explicit in the documentation. Thanks for pointing out!