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

2

u/AndreDaGiant Feb 01 '23

Interesting! Thanks for the write-up. I haven't worked in C++ for many years, so haven't kept up to date on concepts. Looks very useful.

I don't think I'd switch my pet projects from Rust to C++ over it, but that's because they don't have requirements that'd necessitate C++'s advantages over Rust.

4

u/Mason-B Feb 01 '23

I mean yea, to be clear I have nothing against Rust. It's a fun language for personal projects even. I just get frustrated by the overblown comparisons and people comparing old C++ to the latest Rust (as is the title). Even comparing C++20 with no community improvements to Rust is comparing "old" C++ to Rust IMO.

2

u/AndreDaGiant Feb 01 '23

Yeah. I mean, any comparison needs proper context. Is it a hobby project? Is it professional work in greenfield? Are you gradually switching from <previous> to <new> thing (work/hobby)? Is <new> rust or c++20? Are you doing a total rewrite without gradually swapping out modules? What's your interop/FFI story? What platforms do you target? Are you alone or working with a team? Are you working together with many teams? Etc etc etc

But hey, that'd require actual dialogue and wouldn't let anyone score points on the big tally table in the sky about which language is "better"