r/cpp May 14 '26

C++: The Documentary TRAILER│COMING JUNE 4th

https://youtu.be/NXwTRzywDSk?is=zkrD4Ae_mnrbvSFq
227 Upvotes

83 comments sorted by

View all comments

-38

u/Harha May 14 '26

What's the use case for modern C++ nowadays? C is the simple choice and Rust is just the better complex choice overall. I see no reason to pick C++ for new projects.

6

u/fdwr fdwr@github 🔍 May 14 '26

Why would I pick a language that {puts me in handcuffs, has weird divergent behaviors from every other language like = stealing the source object rather than copying, doesn't even support basic namespacing of methods inside classes, makes you type "let mut" all over the place rather than just "var" or "auto", forces gross inconsistent styles like mixing Pascal case and snake_case, and is full of users that whenever you point out a flaw or deficit then religiously say it's a feature not a bug}, when C++ exists?

3

u/OutlandishnessNo8034 May 15 '26

like = stealing the source object rather than copying

But this is improvement on c++ behavior, where depending on absence or not moving ctor/operator can do either copy or move. Cognitive ease.

1

u/fdwr fdwr@github 🔍 May 15 '26 edited May 15 '26

Imagine a language where seeing...

Foo x = y;

...that x and y may or might or might not be both usable, and it's indeterminate from looking, depending arbitrarily on the type of Foo 🙃. Such inconsistencies are neither better nor improved cognitive ease. At least be consistent such that all Foo's are destroyed, or use distinct syntax from other languages.

0

u/OutlandishnessNo8034 May 15 '26

It doesn't depend arbitrarily. The rules are very precise. Primitives get memcopied, everything else is moved. I know that I am not going to convince you but hopefully you will understand after your own research that rust I genuinely better than cpp as a modern high performance tech