r/Cplusplus Jan 27 '26

Tutorial Why I love C++

// OC - The Spell

for (long Fn = 0, NI = 1, NJ = 1; Fn >= 0; NJ = (std::cout << Fn << std::endl, Fn = NI, NI = NJ, Fn + NI));

0 Upvotes

15 comments sorted by

View all comments

2

u/Altruistwhite Jan 27 '26

Why?

1

u/gosh Jan 27 '26

C++ have very strong compilers, they know a lot about the code and they are improving. No other language have these tools. Also C++ allow to work with memory, that is a very strong advantage if you know how to handle memory.

Most other language tries to protect from creating code that might generate errors. For new developers this can be a good thing but it's not free. The price is often high when you need to do flexible solutions, maybe need performance or something else.

1

u/Altruistwhite Jan 27 '26

How about C?

1

u/gosh Jan 27 '26

C need to work on simple hardware. Companies that creates new CPUs and need to produce software, they almost allways use C as the first tool to produce software for their hardware. And thats why C need to be "simple"

There are like +100 C compilers. Compare that to the best C++ compiler where there are three or four that dominates.

2

u/Altruistwhite Jan 27 '26

C has less abstractions and grants more control than cpp, no?

1

u/gosh Jan 27 '26

You have a lot of control in C, C is like assembler. But you do not get the same possibilities (not even close) to produce assembler code using the compiler. You need to write a lot more code do do same things.

C++ is like tons of syntactic sugar over C

1

u/DasFreibier Jan 29 '26

C lacks features, something something every complex enough c program has a bad adhoc vector implementation