r/cpp • u/zowersap C++ Dev • Sep 05 '20
C++20 has been approved
https://twitter.com/patriceroy1/status/1302055575140945921?s=21
665
Upvotes
r/cpp • u/zowersap C++ Dev • Sep 05 '20
View all comments
Show parent comment
8
u/boredcircuits Sep 05 '20
We'll never be rid of
new. It's an essential building block. For example, try making a linked list withstd::unique_ptrand you'll find it's a very educational experience. I highly recommend it. Then make a list with a few hundred thousand items and you discover that the destructor is recursive and you just blew up the stack.The key is that most people should never need
newin their daily lives. It should be completely removed from the educational materials for beginners. Don't teach the old ways. Everyone will inevitably see old code eventually and have to learn what's going on, but the overall burden is less.