3 ms·
The redundancy that matters to me is writing code for yet another serialization or pretty printer. I couldn't care less about syntax. I am a firm believer that
by abenedic 8y ago
The redundancy that matters to me is writing code for yet another serialization or pretty printer. I couldn't care less about syntax.
I am a firm believer that the compiler should do as much work as possible, no matter the time it takes. I think the compiler ought to generate default pretty printers for structs and unions on its own, that may be overridden. Same for serialization formats and so on. The C++ compiler has more than enough information to make programmers lives more convenient at no added runtime expense, and I would be very willing to eat the compile time cost.
I wound up having to write my own preprocessor for C++ to automatically generate structure metadata for an embedded application. I wish there was more of a push for general preprocessors in this direction.