3 ms·
If I'm doing a project in C++, it's because there's some library that does a lot of the heavy lifting for whatever project I'm on. (This is typical for me: I
by wheels 3y ago
If I'm doing a project in C++, it's because there's some library that does a lot of the heavy lifting for whatever project I'm on. (This is typical for me: I usually pick languages for a project based on how good the library landscape for the problem domain in that language is.) And before smart pointers were in the standard, they weren't typically used in library APIs. Even now that they are in the standard, a lot of those aforementioned libraries don't use smart pointers in their APIs, making usage in applications mixed at best.
- asveikau 3y agoA lot of times libraries want to have a C-callable ABI. This means you don't see a lot of C++ features in use between library boundaries, even if they use a lot of it internally. Also, further back in history, the ABIs for a lot of C++ features were subject to change. If you used g++ on Linux in the 90s and 2000s you've been bit by this. I'm not sure if this still happens in the modern era with the standards still iterating a lot; would not surprise me if it still does. This is another reason to avoid interfaces with a high risk of breaking ABI, which C++ features can be.