Ocaml stdlib and death by a thousand papercuts

That seems a bit dangerous to learn as a beginner because there is no flushing directive. It works for Format.asprintf because strings automatically flush, but in general it should be something like Format.*printf "foo = %a@." Foo.pp myfoo. Otherwise, we end up with questions like Why does this code output nothing?.

2 Likes