3 ms·
I spent also countless amount of hours fixing template code, so no I do not let your anecdotes count. There is certainly a lot of problematic macro code in C,
by uecker 1y ago
I spent also countless amount of hours fixing template code, so no I do not let your anecdotes count. There is certainly a lot of problematic macro code in C, but I do not think it is worse than C++ templates, and one can also write robust macros.
- pjmlp 1y agoOne can also write robust template code, if that is the reasoning we're going for, enable_if, static_assert and concepts have been available for a couple of years now. At least that is something we can agree on, C and C++ are both languages where developers could write robust code, and the large majority seldom does it.
- uecker 1y agoI can agree with this. The difference is that C++ approach is to solve problems with features people need to understand while C solves problems by only providing basic building blocks and expects people to use them correctly. In both cases it needs expertise to do this. But Rust also has this problem.