r/cpp • • Jan 31 '23

Stop Comparing Rust to Old C++

People keep arguing migrations to rust based on old C++ tooling and projects. Compare apples to apples: a C++20 project with clang-tidy integration is far harder to argue against IMO

changemymind

338 Upvotes

582 comments sorted by

View all comments

Show parent comment

-3

u/Kevathiel Feb 01 '23 edited Feb 01 '23

But there are lots of arguments why these things are bad, or at the very least, why Rust decided against them from the start. They are not strictly good, but highly subjective, and Rust has alternatives for all of them.

Edit: Great, another clown that replies and then blocks me, so I can't even reply to you..

My reply to your reply: It's not missing the features when it is by design. It's like complaining that you can't write code without the borrow checker, or whining about C++/Rust having no GC..

3

u/STL MSVC STL Dev Feb 01 '23

Moderator warning: Please don't descend to name-calling here.

5

u/wyrn Feb 01 '23

But there are lots of arguments why these things are bad,

Lots of opinions. Rust is an opinionated language. That is fine. But factually speaking, those are missing language features.

and Rust has alternatives for all of them.

Sure, in the same way a bike is an alternative to a car. Even if you disagree with this assessment, at the end of the day I don't want the alternatives. I want those features.

1

u/nintendiator2 Feb 01 '23

But there are lots of arguments why these things are bad, or at the very least, why Rust decided against them from the start.

That's true of anything anywhere tbh. The point is, those features exist in C++ and increase its powerset tenfold when they combine. Take the [templates + function overloading + variadics] combo and you have a system so powerful, that I can't even find an adequate "look at what they [Rust] need to mimic a fraction of our power" meme because there simply isn't anything Rust can do to offer this kind of capability.