We just put out a new release of Base, version v0.11, and it is available in opam now. (Along with the rest of Jane Street’s open source libraries, which have all been released, with the same version number.)
Base hasn’t yet reached it’s 1.0 release, but we hope to get there in the next six months. One of our reasons for delaying the 1.0 release is that we intend for the 1.0 release to prioritize stability of the APIs, and there are a few changes that we need to make before then. You can see some of the remaining changes we want to make before declaring 1.0 on our Roadmap.
As of our 0.11 release, we’ve hit a majority of the issues on our roadmap, but there are still a few to go. But if stability is your top priority, you might want to wait for 1.0 before adopting Base.
You can find the Base changelog on GitHub, but here’s a version below, highlighting some of the breaking changes.
v0.11
Breaking Changes
-
Make
~comparea required argument toList.dedup_and_sort,List.dedup,List.find_a_dup,List.contains_dup, andList.find_all_dups. -
Deprecated
Not_found, people who need it can useCaml.Not_found, but its use isn’t recommended. -
Removed unnecessary unit argument from
Hashtbl.create. -
Removed
Hashable.tconstructors fromHashtblandHash_set, instead favoring the first-class module constructors. -
Removed
Containeroperations fromEither.FirstandEither.Second. -
Changed the type of
fold_untilin theContainerinterfaces. Rather than returning aFinished_or_stopped_early.t(which has also been removed), the function now takes afinishfunction that will be applied the result iffnever returned aStop _. -
Removed the
String_dictmodule. -
Removed
List.exn_if_dup. It is still available in core_kernel. -
Removed “normalized” index operation
List.slice. It is still available in core_kernel. -
Remove “normalized” index operations from
Array, which inclucedArray.normalize,Array.slice,Array.ngetandArray.nset. These operations are still available in core_kernel. -
Remove “normalized” index operations from
String, which inclucedString.normalize,String.slice,String.ngetandString.nset. These operations are still available in core_kernel. -
Removed approximate float comparison operations, e.g.,
(<=.)
Removal of deprecated functionality
- Removed deprecated operations from
Hashtbl.
Deprecations
-
Deprecated
all_ignorein theMonadandApplicativeinterfaces in favor ofall_unit. -
Deprecated
Array.replace_allin favor ofArray.map_inplace, which is the standard name for that sort of operation within Base.
Documentation changes
-
Document that
Array.find_exn,Array.find_map_exn, andArray.findi_exnmay throwCaml.Not_foundorNot_found_s. -
Document that
List.find_exn, andList.find_map_exnmay throwCaml.Not_foundorNot_found_s. -
Document that
List.find_exnmay throwCaml.Not_foundorNot_found_s. -
Document that
String.lsplit2_exn, andString.rsplit2_exnmay throwCaml.Not_foundorNot_found_s. -
Document that
List.find_exn, andList.find_map_exnmay throwCaml.Not_foundorNot_found_s.
Other enhancements
-
Added
Sequence.group, similar toList.group. -
Reimplemented
String.Caseless.compareso that it does not allocate. -
Added the
Sexp.Not_found_sexception which will replaceCaml.Not_foundas the default exception in a future release. -
Added
Sys.argv. -
Added a infix exponentation operator for int.
-
Added a
Formattermodule to reexport theFormat.formattertype and updated the deprecation message forFormat. -
Added
Sys.backend_type. -
Added
String.is_substring_at string ~pos ~substring. Used it as back-end foris_suffixandis_prefix. -
Added
Uniform_arraymodule that is just like anArrayexcept guarantees that the representation array is not tagged withDouble_array_tag, the tag for float arrays. -
Added
Option_arraymodule that allows for a compact representation of'a option array, which avoids allocating heap objects representingSome a. -
Moved all remaining
Replace_polymorphic_comparesubmodules from Base types and consolidated them in one place withinImport0. -
Document that
Hashtbl.find_exnmay throwCaml.Not_foundorNot_found_s. -
Added a
Polysubmodule toMapandSetthat exposes constructors that use polymorphic compare. -
Added a
Queuemodule that is backed by anOption_arrayfor efficient and (non-allocating) implementations of most operations. -
Added missing conversions between
Int63and other integer types, specifically, the versions that return options. -
Added truncating versions of integer conversions, with a suffix of
_trunc. These allow fast conversions via bit arithmetic without any conditional failure; excess bits beyond the width of the output type are simply dropped.