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:
The first step of putting anything in the stdlib is to actually write a library that does it.
So, if you want it, start by writing the library. Publish it, iterate on the design and then maybe propose it. Worse case, you’ll have a good decimal library.
Well, I really do believe it should be in the standard library, but I have nothing against starting it as a separate package. In either case, my main question is still: is anyone willing to contribute one?
I’ve kicked off the process of releasing Jane Street’s arbitrary precision decimal type, called Bigdecimal. It should hit github in a few days, I expect.
Thank you very much, that is very generous. I’ve been working on a straight-up port of the Python decimal module to OCaml for the past few days, but of course Jane Street’s Bigdecimal will be much more trustworthy than my home-grown effort
I’m trying to find bigdecimal on opam but unless it has a non-obvious name I’m guessing it got overlooked for the v0.14.1 release that was made early 2021?
Is there another release on the horizon where bigdecimal could be included?
v0.14.1 refers to a patch release, which for Jane Street packages, is usually things like fixing compatibility on different platforms or adjusting opam dependencies/constraints and things. The next “stable release” would be v0.15, which hasn’t happened yet, unfortunately.