I’ve mentioned this before: What libraries are missing?
But pulling it into a new thread because I have a specific ask: is someone willing to contribute a decimal number implementation to OCaml?
I realize OCaml has historically had a minimalist standard library philosophy, e.g. it’s reasonable to not include a JSON data type, but I believe decimal numbers are a fairly fundamental type especially for business applications. Major industrial language platforms tend to agree:
- .NET: https://docs.microsoft.com/en-us/dotnet/api/system.decimal?view=netcore-3.1
- Java: https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html
- Python: https://docs.python.org/3.8/library/decimal.html
- Ruby: https://ruby-doc.org/stdlib-2.5.1/libdoc/bigdecimal/rdoc/BigDecimal.html
- ObjC/Swift: https://developer.apple.com/documentation/foundation/decimal
And even newer ones:
- Crystal: https://crystal-lang.org/api/0.24.2/BigDecimal.html
- Zig (proposed): https://github.com/ziglang/zig/issues/4221
So, I thought I’d bring it up again, as it’s really pretty foundational IMHO.