News for hackers. Stuff that matters.
Re:Std::visit is everything wrong with modern C++ (2017) by cycloptic on Saturday December 05, 2020 @11:34AM (#25315769)
I see doubly-linked lists and other self-referential structures all the time in low-level code. Boost even has a whole library dedicated to them: http://www.boost.org/libs/intrusive
Re:Std::visit is everything wrong with modern C++ (2017) by nchi3 on Saturday December 05, 2020 @01:15PM (#25316801)
Yeah, hence high level non-GCed language. Using heap allocated linked lists is rarely the way to go if you're not developing for embedded.

However, if you're developing for embedded you'll probably want to be familiar with unsafe either way if you're going to use Rust.

Regarding self-referencing: Rust encourages you to design differently, which I've found leads to nicer and more thought out designs most of the time. Not all algorithms are possible (or efficient) without it though, and for those you'll have to use unsafe if you _really_ have to implement them yourself.

Re:Std::visit is everything wrong with modern C++ (2017) by steveklabnik on Saturday December 05, 2020 @12:38PM (#25316429)
For a really interesting take on this area, see http://dtrace.org/blogs/bmc/2018/09/28/the-relative-performa...

Specifically, the discussion about intrusive vs non-intrusive data structures and their frequency.

Re:Std::visit is everything wrong with modern C++ (2017) by cycloptic on Saturday December 05, 2020 @03:28PM (#25318002)
It would be interesting to see how that measures up in a different test where the accesses are all from a cold cache.