4 ms·
C with classes is undervalued, and templates are overvalued, IMO. Just switching compilers makes the C code more robust.
by Shorel 11y ago
C with classes is undervalued, and templates are overvalued, IMO.
Just switching compilers makes the C code more robust.
- eropple 11y agoTemplates can be abused, but there's real value to simple ones such as container classes and even shared_ptr and unique_ptr. The subset of C++ I personally use is pretty small, but I hope I never go back to manual memory babysitting.
- waps 11y agoTemplates are the main thing in C++ that you can easily use everywhere with zero costs in compatibility. And they certainly beat C's "equivalent", macros.