The perils of pinning
The perils of pinning
Posted Sep 15, 2022 22:43 UTC (Thu) by khim (subscriber, #9252)In reply to: The perils of pinning by Sesse
Parent article: The perils of pinning
It's double-linked list in Linus's good taste.
The idea is that there are never any NULL
pointers and thus never need to deal with them.
And, of course, when you convert that data structure to Rust you want to keep that property… and you couldn't! Rust doesn't have any constructors and structures are created in one place (on stack) and then are moved into proper position.
This was never a problem for new Rust code, but it's very often quite awkward.
And indeed, language-level solution would be great. But before it can be implemented it first needs to be imagined and it's not that easy here.