(Apologies if this is in the wrong place—am new here! Hi!)
I’ve recently just picked up OCaml after a few years of working with F#. So far, I’ve mainly been using the standard library’s
Format module to do pretty-printing (so, boxes and boxes and more boxes).
As I’m gravitating towards the
base trifecta, I’ve noticed that
base has deprecated
Format (but not
Format.formatter itself, which survives as
Formatter.t I think). This makes me wonder—is
Format considered obsolete in some sense, and, if so, is there a better pretty-printer library that I should be using instead?
I’ve seen quite a few pretty-printers, but none of them seem to be objectively better than
Format, hence the confusion (that, and
Base doesn’t mention why it’s deprecated the stdlib version!).
In case of XY problems: I’m wanting to pretty-print a variety of things: bits of programming language, error messages, warnings, tables (eg, ASCII representations thereof), and the occasional debug output (though I usually use sexps for this). I’d like to use colour on the terminal if possible (maybe with a degree of decoupling between semantics and output like
Format seems to have), but I’m not yet doing so.