To offer the perspective of a relative outsider who has meekly decided to pipe in:
A standard library with a variety of general-purpose "building block" of functionality is invaluable. I feel it's missing in OCaml.
Here is some important functionality that I'd like to see based on my own experience writing a small-to-moderately sized OCaml program.
- Modules for standard types like `Int` and `Float` as previously mentioned
- More standard definitions like `compose`, `const`, `identity`, etc (also as previously mentioned)
- Comprehensive string and regular expression handling (UTF support can be relegated to an endorsed third party package)
- More helper functions in the `List` and `Option` modules
- A standard general purpose lazy list (stream). I was able to implement this comprehensively in about 300 lines, and its enormously useful. It's absence means that everyone will write their own, or that there will be hundreds in opam
- More immutable data structures like queues, heaps, stacks, etc
- A standard means of concurrency. Lwt is great, but is almost its own standard library at this point, and there's still a split between it and Async.
- Better support for error-handling-by-value with `either` and `option` through helper functions
- The ppx_deriving package reduces a TONNE of boilerplate for making defining ordering on data for instance. It should be a standard extension (or something like it)
- Better documentation/endorsement of build tools. It's possible to get pretty far with ocamlbuild, _tags, and a simple Makefile, but figuring out how to get there was not exactly easy
- Better interfaces to the file system with more structured error handling on failure (`Sys_error` was not the nicest thing to work with).
- Less reliance on exceptions for non-exceptional situations and retrofitting "pure" functions like `hd` with `option` or `either` result types.
- Less duplication and or more aggressive deprecation. It's not clear to me why there should be both "Foo" and "FooLabels" modules, for instance. I also hear that some modules in the standard library are probably best avoided.
Finally, about the governance of such a library:
While libraries like Core and and Batteries are undeniably useful, I found myself somewhat discouraged in practice:
- Batteries has relatively low adoption and I think it does too much
- Core is driven by a private organization. In practise, I've found the (lack of) documentation to be a major blocker, and I'd feel better about using it if it was truly community "owned" (or if there was a non-profit spin-off to support and own it like the F# foundation, for instance).
Best,
--
Jesse