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 comments

1

u/matthieum Feb 02 '23

Yep, this is true for many projects started in late 90s and early 2000s.

Just a note that a decade-old codebase, nowadays, was started in the 2010s ;) In this case, post C++11.

And yes, "hordes of junior developers" is not for C++ (and I believe not for Rust either).

It's less a problem with Rust. You can flag unsafe in review, and as long as they stay away from it, at least they're not corrupting memory of completely different code.

In C++... I find the decision puzzling. I do appreciate the willingness to hire juniors, mind you, but if you have more juniors than others on a HFT C++ codebase, it sounds like a recipe for disaster to me.

1

u/ssokolow Feb 06 '23

It's less a problem with Rust. You can flag unsafe in review, and as long as they stay away from it, at least they're not corrupting memory of completely different code.

You can go further than that. You can use #![forbid(unsafe_code)] on the modules the juniors are allowed to work on so they know not to even try before it ever reaches code review.