A big one that’s missing: a decimal data type. .NET (i.e. C#/VB.Net/F#) has the built-in type decimal
, Java has BigDecimal
, etc. It’s the obvious and only reasonable way to deal with monetary calculations.
Previously:
- Decimal floating point arithmetic - it was suggested to use Zarith bigintegers or rationals
- https://github.com/ocaml/Zarith/issues/55 - Zarith maintainers think decimal type is out of scope for Zarith
- https://inbox.ocaml.org/caml-list/f7b50d2a0905160027g532878feo9ee7191ccde40a1d@mail.gmail.com/T/#u - it was suggested to use a long integer and manually track scale.
Edit: a little surprising to have this gap in OCaml, with OCaml being so ‘popular’ in the fintech world…