Re:Comparing Pythagorean triples in C++, D, and Rust
by WalterBright on Monday December 31, 2018 @04:46PM
(#18797244)
For example, when I debug the compiler, I'll often need the AST printed. Printing out standard containers doesn't do that. And sometimes I need the AST printed in different ways.
[ Parent
| on HN ]
Re:Comparing Pythagorean triples in C++, D, and Rust
by neerajsi on Monday December 31, 2018 @05:53PM
(#18797580)
On the Visual C++ team, we use natvis to show FE AST nodes. It works pretty well with a couple hours of investment in writing the natvis.
Re:Comparing Pythagorean triples in C++, D, and Rust
by WalterBright on Monday December 31, 2018 @06:33PM
(#18797804)
I know that one can write custom pretty-printers for debuggers. But I like having the pretty-printers in the program itself. After all, I develop simultaneously on many diverse platforms.