C++ is a bad programming language

And templates.
And exceptions.
And destructors.
Oh btw. you can't throw exceptions in destructors, that'd be UB.
Also, for reasons I forgot, your public API shouldn't throw any exceptions.
So the standard library doesn't throw exceptions and require you to check error codes. Well, some parts do that. Other parts do throw exceptions.

@jordan31 @sir
Also, did I mention templates?
They need to be defined in the same compilation units in which they're used.
Including all method implementations.
So that means you define them in headers, whose content gets means of #include into every compilation unit.
Which means every template is compiled N times, making builds awfully slow.

@wolf480pl @sir I thought the compiler was smart enough to not built it over and over. Or at least some protections built in for issues like that?

No, and I think it wouldn't be possible.
The meaning of a header depends on everything that happened before you included it.

There is a thing called precompiled headers which saves the parsing step, but AFAIK it doesn't help that much, and I haven't seen anyone use it.

@jordan31 @sir
Also, if you modify one implementation detail in a popular template, you need to recompile most of the .cpp files anyway.
What was the purpose of separate compilation units, again?

@sir C++ is a bad programming language BY DESIGN


@sir Starting as a preprocessor to C didn't help. Several times I tried to like it, but... no. It never took.

@jaxter184 @sir there are no good programming languages. Software bad.

@sir No, it's a good language because it slows people down, which means it causes them to write less bad software than they otherwise would have been able to.

@philipwhite @sir most code is bad until you finish it and have actual people use it so you can begin removing all the bugs.

Slowing the programmer down just means their code is gonna be bad for longer.

"C++ is a bad programming language" - everyone on c++ committee, while taring into each others throats to push their proposals

"Our language is the perfect language of god" - any other language designer

Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!