Hacker News new | ask | show | jobs
by l_theanine 1204 days ago
Ocaml seems somewhat hampered by this weird disconnect between upstream maintainers and Jane Street and other third party major users. Popular media for ocaml learners describes using Base, while documentation focuses on the builtins, which clearly aren’t used that often in practice.

Do I have this wrong? Why doesn’t Ocaml just merge Base (with permission) and put their best foot forward for the ecosystem?

3 comments

Aside from the obvious fact that replacing the Stdlib with Base would break existing code, Base has an unstable and quite opinionated API and isn't tested on all targets OCaml supports (Jane Street is looking to drop support for 32-bit targets altogether). There would be a lot of tension to adopt it.

Meanwhile, the built-in Stdlib finally started to acquire much needed functions and modules during the late 4.x releases. My biggest worry is whether they'll keep up the pace, it doesn't even have a resizable array or, alternatively, a Clojure-like vector (but neither does Base).

So, you’d say there’s a healthy contingent of upstream devs dedicated to the health and diversity of the built in stdlib?

May I also ask, have you worked with Ocaml for any medium to large projects?

I’d be curious to hear from major users that are NOT using Base, and hear how they’re getting on. The 5.0 release especially has catalyzed my interest in Ocaml, and I’ve a few years left in me still before retirement, I’d like to pick up one last niche ‘fore I quit.

It’s complicated. From my perspective the core team was too slow to support a strong stdlib and so entreprises took over by replacing it. Now you have this ugly world where you’re split between these two things. And since everything jane street is poorly documented you are sort of forced into a poor ecosystem if you want to do serious OCaml projects.

The same thing is true with the build system dune and opam. Half-assed build system and package managers that we’re kind of stuck with.

I dream of a new cargo-like build+package manager system for OCaml that would just take over everything we currently have.

You have it wrong. The official standard library is under constant development and in practice many people use it and not the Jane Street stuff.
I don't think they're wrong

the Jane Street side are quite prolific with blog posts etc

as a newcomer to OCaml one of the first, and nicer-looking, intro resources you'll likely encounter is the Real World OCaml book https://dev.realworldocaml.org/ which unfortunately does everything using Base instead of the stdlib

Personally that didn't sit right to me and I prefer to use the stdlib by default (which seems fine and not in need of a wholesale replacement)

There definitely is indeed a problem, namely a false perception that the stdlib is a moribund relic with one foot in the grave. What I'm saying is that it's fairly healthy and gets used plenty by general OCaml users.
I totally agree
Are there some large users or projects that are committed to the stdlib and not Base that I could look into or read about?

Thanks in advance.