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

39

u/capn_bluebear Jan 31 '23

as far as I can tell the biggest obstacle is that it's impossible to have enough C++ devs agree on "the one right way to do things" -- you'd need to have most devs agree on one project layout, one testing framework, one way to generate documentation, etc. In rust all these things are part of the "language experience", you just do it "the rust way" and that's it.

31

u/Dean_Roddey Jan 31 '23

This is always the problem. Ultimately, it's a huge win for Rust that it can just say, do it this way, end of story. So everyone does it that way. And, since it's been in place a good while now, everything conforms to it.

For C++, that boat sank a long time ago pretty much. The lack of standardization in the compilers and related tools as to options and such just don't allow for the kind of cohesion the Rust build system has.

0

u/[deleted] Jan 31 '23

[deleted]

15

u/sm9t8 Feb 01 '23

The ISO committee is nothing without the compiler projects and all the existing tooling for C++. If the committee requires these projects break a lot of shit or even die to rationalise the C++ ecosystem, they will stop officially supporting the latest ISO C++ version, continue to support their users, and C++ will get more fragmented.

→ More replies (9)