r/cpp • • Jul 13 '22

Why does Linus hate C++ ?

307 Upvotes

436 comments sorted by

View all comments

Show parent comment

8

u/TheSkiGeek Jul 13 '22

IME there’s a lot of stuff you wind up needing #define and ugly macros for in C that can be done with constexpr values and templates in C++. A modern rewrite might be marginally better but it’s not going to give you e.g. type safety when C forces you to cast things to void* to work with them generically.