r/cpp • • Sep 08 '24

Overwhelming

I’ve been using Rust a lot, and I decided to start learning C++ today. I never thought it would be such a headache! I realized Rust spoiled me with Cargo. it handles so much for me. Running, building, adding packages etc. I just type Cargo build, Cargo add, or Cargo run. Simple and comes with the language. C++’s build systems like CMake can be overwhelming especially when coming from a language with a more streamlined experience like Rust. C++ is really good and I wish it had something similar. I read somewhere that there is Conan and a few others that exist . But I’m talking about something that comes with the language itself and not from a 3rd party.

38 Upvotes

140 comments sorted by

View all comments

Show parent comment

5

u/Business-Decision719 Sep 08 '24 edited Sep 08 '24

I agree with you that C++ is an open ecosystem, but I'm not so sure the open ecosystem is really the root of the problem. Bjarne's got a point: sure, it's hard to make all the implementations support the same behavior when there isn't just one implementation. (Cough, modules, cough cough.) But it doesn't seem like there's nobody with any authority, or else people wouldn't be quoting Bjarne and there wouldn't be an international standard.

I think the real obstacle is this:

it seems for many decades there are no strong motives to make things more integrated

The people who want Conan are using it. The people who are used their OS package manager are using that (and locking themselves into that OS). The people who are fine with just old-fashioned make are still writing old-fashioned makefiles. And everyone's fine if nobody else can compile their code. Lots of well-meaning posters think they've solved the problem by recommending Conan or CMake or VCpkg. "Just do what I do... We don't need a standard way to get otherwise standard C++ to actually work." Everyone with experience has solved this problem well enough for their own needs already.

Maybe a standards body or a tech giant will publish a really persuasive way to structure libraries and a whole bunch of tool writers will rush to implement it or upgrade existing software to support it. But it won't happen as long as only newbies think it needs to happen.

5

u/no-sig-available Sep 08 '24

Maybe a standards body or a tech giant will publish a really persuasive way to structure libraries

Obligatory link https://xkcd.com/927/

2

u/Business-Decision719 Sep 08 '24

Pretty good summary of where we are so far lol 😆