[ANN] Containers 1.4

announce

#1

I’m happy to announce a new release of containers! The library is maturing, so releases are becoming smaller. This release contains some performance improvements, including a new List.map inspired from the thread started by @antron, thanks to @bluddy, and a few bugfixes and new functions.

More informations at https://github.com/c-cube/ocaml-containers/releases/tag/1.4


#2

Nice!

Further thanks to @paurkedal for the actual map implemented :slight_smile:


#3

Hi, I’ve played a bit with and it looks nice but there’s something that irks me. The inconsistent naming of printers in Container module

open Containers

module IntMap = Map.Make(Int)
let nums = IntMap.(empty |> add 1 "one" |> add 2 "two")

Format.printf "@[map = %a@]@." (IntMap.pp Int.pp String.print) nums

It so happens that the printer in Char and String is print and in Int, Float, Bool, List, Array is pp

Judging by project README it looks like there was a transition from print to pp, but it is not complete yet? Amirite?


#4

Indeed, not everything is consistent :-/
Mostly I tend to use CCFormat (perhaps aliased to Fmt) and sequence/list printers. I should still fix these discrepancies at some point, but it would break compatibility (even though I don’t think many people use the Buffer.t printers).

edit: issue at https://github.com/c-cube/ocaml-containers/issues/153 (will probably be fixed in the next version)


#5

That was pretty much what I assumed. Obviously, a matter of preference, where to put to printers, and which to use.