r/cpp • • Jul 13 '22

Why does Linus hate C++ ?

308 Upvotes

436 comments sorted by

View all comments

Show parent comments

63

u/TheThiefMaster C++latest fanatic (and game dev) Jul 13 '22

The equivalent C code to accomplish the same goal is often far worse.

These arguments always compare the most complex parts of C++ against normal C code, not equivalent C code.

-6

u/snejk47 Jul 13 '22

What's the point of using C++ if you only use the such subset that makes it like C anyway.

41

u/TheThiefMaster C++latest fanatic (and game dev) Jul 13 '22

I didn't say that. Just that e.g. templates in C++ aren't comparable against a normal C function, they're comparable to either half a dozen subtly different C functions for different types or a horrifying macro monstrosity. Both of which are worse than a single C++ template.

-8

u/snejk47 Jul 13 '22

But they do not use that for exactly that reason. Why are you trying to put C++ features into other languages. This is exactly the reason to choose something different, because you do things differently.

→ More replies (7)