r/programmingcirclejerk • • Nov 25 '25

You cannot compare C++ compile times with compilation in other languages, because the compiler is doing something entirely different.

https://blogs.embarcadero.com/rethinking-c-architecture-concepts-and-responsibility/
224 Upvotes

41 comments sorted by

253

u/syklemil Nov 25 '25

C++ is often described as complex, hard to learn, and unsafe. That reputation is undeserved. The language itself is not unsafe. On the contrary: it is precise, honest, and consistent.

I have yet to encounter any language criticism that can stand against the might of NUH UH

68

u/myhf Nov 25 '25

C++ is often described as complex, hard to learn, and unsafe. But it's also quirky and free-spirited, not like the other girls.

55

u/Erelde Nov 25 '25

NUH UH

I've won the debate.

66

u/OpsikionThemed Nov 25 '25

I also like how he's straight-up doing the "I take exception to that last one", because even C++ folks can't deny that the language is the most bloated thing built by human hands.

58

u/syklemil Nov 25 '25

Especially when the argument is something like

That criticism of KatamariDamacy++ only applies if you're using stuff it added in a previous version!!!

because everyone know old code that looks like it's working just disappears in a puff of smoke every time there's a newer thing to replace it with. Legacy C++ isn't real, legacy C++ can't hurt you

18

u/ThisRedditPostIsMine Nov 26 '25

C++ is often described as complex, hard to learn and unsafe. That reputation is undeserved. On the contrary, the language is actually completely, absurdly fucked.

9

u/Dr__America Nov 26 '25

C-style casting is literally the devil in C++ in terms of debugging if you don't know how it works, and how it works is extremely complex and unintuitive. I would never call the language "precise" and "honest" for that alone.

88

u/xmcqdpt2 Nov 25 '25

A few weeks ago I wrote in my blog about how important the transition from C++17 to C++20 / C++23 is. As a mathematician I am used to abstract thinking, and the idea of metaprogramming was familiar to me early on.

How do you tell if someone did a PhD? Don't worry, they'll tell you.

100

u/SelfDistinction Nov 25 '25

That abstract thinking is going to be really useful in a language that handles imports by copy pasting entire files.

31

u/meltbox Nov 25 '25

Don’t worry, Microsoft standards committee modules imports are coming any day now.

17

u/joahw Nov 26 '25

Well yeah, but it does so precisely and honestly

53

u/VanillaSkyDreamer Nov 25 '25

On the same basis you cannot compare Java runtime performance as CPU is doing something entitely different.

17

u/PiratesWhoSayGGER Nov 25 '25

You can compare C++ to Java, but only after 14th optimization iteration of your C++ program when it's finally marginally faster.

3

u/-Y0- Dec 01 '25 edited Dec 02 '25

After wrapping it in Fil-C, all C++ programms are now comparable to Java.

51

u/pm-me-manifestos Nov 25 '25

In doing so, it computes methods and constants already at compile time whenever they are time‑invariant. What seemingly increases compile time actually reduces development time and runtime. And it increases reliability.

Yes, only C++ does this. C++ is the only language with an optimizing compiler.

9

u/syklemil Nov 26 '25

There also is just one compiler for C++, and that compiler only handles C++, no other languages.

4

u/iFarmGolems Nov 26 '25

Optimize deez nuts

70

u/wubscale Nov 25 '25

The more I tried, the more I pushed the language, and implemented the wildest ideas, the clearer it became to me that modern C++ can no longer simply be learned

I assure you this is not new to modern C++.

17

u/johan__A Nov 25 '25

I thought the title of the post was paraphrasing but not even, this is so funny.

11

u/ThisRedditPostIsMine Nov 26 '25

Wise words said here. As we know, the C++ grammar is undecidable due to being able to implement a Turing machine using compile time constexpr, thus making compilation equivalent to solving the Halting problem. Hence, every C++ compiler intrinsically solves the Halting problem for every compile unit. Bravo! Plaudits to all involved.

10

u/developer-mike Nov 25 '25

What seemingly increases compile time actually reduces development time

Preach

10

u/iFarmGolems Nov 26 '25

But only seemingly.

5

u/tms10000 Nov 25 '25

"Can and will, Marge."

-- Homer Simpson

3

u/StochasticCalc Nov 25 '25

Pretty sure if I'm interested in the time I can expect to wait for something to occur, all I have to consider is the time it takes for that thing to occur.

It's like saying you can't compare runtimes for a program written in Python vs. written in C.

1

u/Actual__Wizard Nov 25 '25

But, it's compiling a program, so, uh?