5 ms·
Indeed. Pre-C++-11, I would actually have said that I know C++ very well. The language had a pretty stable surface area for a long time. C++11 was such a maj
by wheels 3y ago
Indeed. Pre-C++-11, I would actually have said that I know C++ very well. The language had a pretty stable surface area for a long time.
C++11 was such a major change to the language that not only was there a lot new to learn, but a lot of new best practices needed to be developed, and a lot of the common sense on those wasn't practical because of the need to interface with existing code and libraries. I feel like reasonable API design and coding style still hasn't stabilized post-C++11.
- usefulcat 3y agoThis matches my experience. In 2010 I had been using c++ for ~15 years and at that time would have said (correctly) that I knew pretty much the entire language. This was at least partially confirmed by an interview I had at that time for a c++ role, for which I immediately knew the answer to every c++ question. Since then I've continued to use the language daily but have given up hope of ever getting back to that relative level of knowledge. I just try to learn little bits here and there whenever it's relevant to something I'm working on.
- asveikau 3y agoA lot of the new best practices of c++11 were already being developed and advocated for years before C++11. There was a part of the community that was focused on RAII, smart pointers, etc. Even lambdas had their beginnings in functors. I think the difference is a lot of people were ignoring these trends in their c++ use, and were slightly blindsided when the standard appeared to endorse them.
- wheels 3y agoIf 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.
- indigoabstract 3y agoYes, complexity-wise, it was the start of the big bang. But it was also a badly needed update and C++ would have probably died if it had continued on that path. Pre C++11, I remember having to include Boost, which is huge, just so I could replace the manual delete calls with smart pointer equivalents and use the thread and file system API. Maybe the additions could have been managed better, but I don't think there's an easy answer as to how. Hopefully, this is something that can be improved. We'll see.