Hi, just a heads up that the Core_kernel library from Jane Street will eventually disappear, leaving place to only Base and Core. More details in this blog post on our website:
This change is good but is not backward compatible. We have a few ideas to make the transition smoother in opam, but we haven’t settled on a concrete plan yet.
By the way, it would be awesome to have platform-independent Filename module, like some other languages do. Most of the existing functions could be implemented in a cross-platform fashion, I think.
Sorry, the post isn’t clear about this, but Core.Filename is in fact still there, and is now portable. What’s happened is that the non-portable functionality of Core.Filename has been moved in to a new library, Filename_unix. Notably, things like tmpfile functions that actually manipulate the filesystem have moved to Filesystem_unix.
A small note on the cookie policy of the blog: clicking I don’t agree gives: You have indicated that you do not want to be cookied by us. If you continue on our site, you are agreeing to our Ad and Cookie Policy. If you do not agree, please navigate away from this site.
I find that to be a strange message. First you give the choice but then you reveal there wasn’t a choice in the first place?
This is indeed a welcome change. When you mean portable, do you also include MirageOS and js_of_ocaml?
Since both base and core is portable now, why do we need both? Couldn’t base be subsumed into core itself? I ask because I thought base's raison d’etre was portability to various OSes/platform. Now that core itself is portable why would anyone want to limit themselves to stripped down version of core - ala `base?
js_of_ocaml definitely as we use both Base and Core in applications compiled to javascript with jsoo inside Jane Street. For MirageOS, I would expect that both are compatible but I can’t say for sure as we don’t use MirageOS inside Jane Street.
Besides being portable, Base is also intended to be much more lightweight than Core. It has no dependencies other than sexplib0 (which is itself very small), and so it compiles much faster than Core.
In addition, Base has stronger stability guarantees than Core: it promises to be compatible with at least 4 major versions of OCaml. So, for example, 4.08, 4.09, 4.10, and 4.11 in v0.14.1. (Actually, thanks to kit-ty-kate, it also supports 4.12).
Hopefully, this all makes the differences between Base and Core clearer. In particular:
Base is lighter, much faster to compile, and more stable.
Core is 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 bin_prot and base_quickcheck .