We recently restructured our standard libraries at Jane Street in a
way that eliminates the difference between
and we’re happy with the result. The new layout should reach the open
source world before the end of the year.
For many years, Jane Street has had two variants of our
Core_kernel, which extends
Core, which extends
Core_kernel, adding functionality that uses the
We eliminated the distinction between
moving (mostly non-portable) functionality from
Core out to
standalone libraries, and then simply renamed
The upsides of this change are clear enough:
It’s simpler. Instead of three different flavors of our standard library, there are just two, hopefully with clearer purposes.
This change is the culmination of work that has been going on for
years. We had already moved most of the functionality out of
Core_kernel or to standalone libraries that depended on
Core. In the end, there wasn’t that much code that distinguished
Core_kernel, so the change is smaller than it seems.
Hopefully, this all makes the differences between Base and Core clearer. In particular:
Baseis lighter, much faster to compile, and more stable.
Coreis more extensive, having both more useful libraries and data-structures, as well as some more useful functionality broadly integrated into it, like pervasive integration of
And both of them are fully portable.
Adapting code to the change
The recommended way to adapt code to this change is to replace
Core and then to build with deprecation errors
enabled. We have left behind
@@deprecated annotations throughout
Core for functionality that was moved into standalone libraries.
So, you should get deprecation messages if your code needs further
For example, if you use
Core.Date.format, you will get a deprecation
Error (alert deprecated): Core.Date.format
[since 2021-03] Use [Date_unix]
Date_unix is the name of the new standalone library that
Core.Date with Unix-dependent functionality, include
Here’s a list of the modules that moved from
Core to a standalone
Releasing this change in the main opam repository
This change is good but is not backward compatible. As a result, some care will be needed to release it into the opam repository. We have a few ideas for how to make the transition smoother, but we haven’t settled on a concrete plan yet. We plan to work more proactively on it starting from September.