3 ms·
> I only have a guess as to what a `shared_ptr` or `unique_ptr` type is, and I certainly don't know when to use them, and concepts/traits outlined in the STL do
by inetknght 4y ago
> I only have a guess as to what a `shared_ptr` or `unique_ptr` type is, and I certainly don't know when to use them, and concepts/traits outlined in the STL documentation seem to be some sort of generalizations that the STL might provide default implementations for, but might not? What exactly is the syntax and/or type of a lambda function and how do they interact with C function pointers? etc., etc.
And that's exactly my point though! `shared_ptr` and `unique_ptr` solve (or, at least, simplify) a lot of the memory management problems endemic to all C code and old C++ code. And they've been around for over a decade now.
I would absolutely be willing to spend some time with you to teach you what new things are, what they do (and what problems they solve), and how to use them without introducing new problems. I think several one-on-one teaching sessions would help you a lot with that. But one-on-one teaches you and not the thousands of other old-experienced C++ developers also in your shoes.
> I get the sense that C++'s evolution has been driven by esoteric corner cases that a handful of developers have encountered and the language & STL design has been driven by those cases.
While some of the C++ evolution fits that category... I would also add that a lot of changes in modern C++17, C++20, or C++23 are aimed directly to the masses of C++ developers doing "everyday" work. shared_ptr and unique_ptr are definitely not esoteric corner cases: they're driven to specifically solve memory management problems that have directly contributed to some very significant CVEs in many thousands of products.
- gridspy 4y agoA series of expert-level blog articles guided by your experiences teaching a pre-2010 C++ guru would probably be well received by other such "ex-gurus." They would need to be definitive, detailed, verbose and bring the reader up to C++ lawyer in the relevant new feature to be interesting. A trip through the graphics pipeline has the correct level of detail: https://fgiesen.wordpress.com/2011/07/09/a-trip-through-the-graphics-pipeline-2011-index/ https://fgiesen.wordpress.com/2011/07/09/a-trip-through-the-...
- cillian64 4y agoI tried to find a book which assumes knowledge of and experience with C++98 and brings you up to speed as far as C++17. Do you know of such a thing? I read some of Effective Modern C++ but it seemed to be more a list of footguns and poor design decisions in the later C++ editions.
- inetknght 4y ago> Do you know of such a thing? I'm afraid I haven't read any C++ books. I'm sure that's where some of my strong biases come in; I'm all self-taught with some cppcon videos and attendance sprinkled in for topics that I know I'm weak in. I can recommend a Slack [0] or Discord [1] though. There are plenty of other C++ people who can make such recommendations. [0]: https://cppalliance.org/slack/ https://cppalliance.org/slack/ [1]: https://www.includecpp.org/discord/ https://www.includecpp.org/discord/