News for hackers. Stuff that matters.
Re:Don’t blindly prefer emplace_back to push_back by gmueckl on Thursday March 04, 2021 @06:31AM (#26341133)
Even if linked lists and double linked lists aren't all that universally useful by themselves, they teach all the basics about taversing data structures by references / pointers that more complex trees and graphs require. A linked list is just a degenerate tree with at most one child for each parent. So I think teaching that isn't a bad decision.
Re:Don’t blindly prefer emplace_back to push_back by dmurray on Thursday March 04, 2021 @06:33AM (#26341153)
I couldn't have said it better :)
Re:Don’t blindly prefer emplace_back to push_back by beaconstudios on Thursday March 04, 2021 @06:37AM (#26341172)
good point, they may still be useful as a pedagogical tool to introduce pointer-based structures.