Core_kernel is a superset of
Base (and its related libraries)'s functionality, I’ve noticed there are some places where the exposed API surface is a little different: for instance,
Base_quickcheck (which expects modules as input to its tester) vs
Quickcheck (which expects functions), and the fixed-comparator
Map instances (which come as standard through
Core_kernel's comparable functors, but need something like
Base, and generally seem to be less supported than passing comparator witnesses around directly).
Is it as clear-cut as the
Core_kernel versions being old/deprecated/not recommended and the
Base ones being new/cleaner/recommended/etc? Should I prefer using the
Base-flavour API over the
Core_kernel one? Or is it a bit more nuanced?
More generally, should I be trying to avoid using
Core_kernel where possible (and only opening it when I actually need its extensions over
Base), or is it still a generally useful
Stdlib replacement? At the time I started using
Core the latter was the feeling I got, so it (and
Core!) have pervaded my OCaml code quite a lot
I figure this touches on something I asked a while back, which was whether
Format was deprecated—the fact that
Core_kernel still carries it but
Base doesn’t makes me wonder if
Base is the ‘new’, less baggage-y way to do things.