3 ms·
I also recently created a pretty printer library (https://github.com/calebzulawski/hippo https://github.com/calebzulawski/hippo). In some ways they are similar
by calebzulawski 7y ago
I also recently created a pretty printer library (https://github.com/calebzulawski/hippo https://github.com/calebzulawski/hippo).
In some ways they are similar, though I felt it was valuable to avoid using ostreams at all, and store indentation levels separately from the printed string. Additionally, I think reflection macros are especially helpful for creating printers for user-defined types.
- phaedrus 7y agoI like your idea to support separately tracked indentation levels.
- calebzulawski 7y agoThanks! It really makes writing printers very easy.