As a beginner in OCaml, I’ve only ever used the standard library. I like to see small quality of life improvements land from time to time. I feel like it’s “enough” for most of my usage (mostly CLI tools or web applications), but since Core, Base, Batteries and Containers exist, I think I may be missing something.
I’ve used other languages where the standard library is bigger and more opinionated, and I’m not sure how this would work with OCaml. For example, an HTTP server and client in the standard library doesn’t sound like the kind of thing anyone would want. On the other hand, something like the flag
package from Go sounds small and low impact, and it really helps.
One idea that I’ve seen a few times here would be to make an “opinionated” OCaml distribution. It would be OCaml, distributed with a set of blessed libraries that would handle common tasks: HTTP requests, logs, database connection, cli arguments, testing, benchmark, maybe even GUI? This could be independent of the OCaml stdlib and allow some experimentation, and an easier environment for beginners. I think what’s offered by the Go standard library would be a good start, though we could have more containers easily since their library was made before generics.
The vision I have in my head is a bit like what’s made in the React world with create-react-app: you could have a tool to wrap around dune and opam and add all the libraries, and if you want you could opt-out (eject in create-react-app), and you’re left with a regular dune, opam and OCaml project.
For other issues like ppx_deriving_yojson vs ppx_yojson_conv, that may be where an ecosystem “guide” would help. From what I understand, ppx_yojson_conv doesn’t support custom conversion functions like ppx_deriving_yojson, so if you need one, the choice is already made.
Since 5.0 is coming, maybe now would be a good time to make a big “state of the ecosystem” survey, asking people what they use, what they need, referencing the different options, and seeing where more energy/help is needed. A survey was done in 2020 but I don’t see anything for 2021.