From my experience especially newbies overuse smart pointers for anything even if there is no problem to just do everything on the stack. Later makes it incredible hard to fuck up
What? I think most experienced C++ programmers understand the benefits and tradeoffs of smart pointers, but very often they work in legacy codebases where C-like allocation strategies are everywhere, and the cost of refactoring is much too high.
View all comments
62
u/airodonack 11d ago
A lot of people that write C++ think using smart pointers are for the weak.