C++ soldiers on because it can support such things and adapt to decades of changing hardware and philosophy. But the pain of using and composing libraries in C++ is not just about not having cargo or npm - it's the lack of consensus on data types for anything beyond C primitives.
Everything uses/supports standard library containers or interfaces now.
Also it's still completely normal to use raw pointers or references when a function doesn't care about ownership.
I am an old man, and to me 2011 doesn't feel ancient, but fair. C++ 11 has unique_ptr and shared_ptr (if your library uses a previous generation of smart pointers you're in worse trouble than if it had raw pointers) and that's what you'd probably teach in class today.
> Also it's still completely normal to use raw pointers or references when a function doesn't care about ownership.
This is true. So you can't tell. And, with a different hat on it's also something that Kate Gregory has given talks about. As the new maintainer for several MLOC of C++ what can I conclude about this function that takes a raw pointer to a foo ?
Maybe, it just wants to look at a foo, immediately and then has no further interest in it.
Maybe, it will mutate the foo, immediately, and then loses interest.
Maybe, it will hang on to this pointer and use it later, who knows when. Thus, now it "owns" the foo, I hope it will clean up after it ceases using it because I can't now.
Maybe, I'm supposed to provide an "empty" foo and the contents of it afterwards are the primary result of the function.
Those are pretty different, so it's disappointing that we don't learn which it is from the function signature.
So, sure, all the code from people learning "modern C++" is smart pointers and ranges, but to get work done you have to call this library that takes raw pointers and you're immediately out of your depth.