Skip to content

Comment on Intrusive linked lists (2019)

Comments

Now try to do them in safe Rust.

The issue is that back-links in data structures are inherently difficult to handle a thread-safe way in mutators.

Not more than regular collections (unless you mean working on different parts with different threads, then it's still possible but harder, just like with regular collections).

Importing a library does not count. (Besides, perhaps you can tell but I don't even know if the library uses safe Rust internally.)

Internally? No. Externally? Yes. That is the point.

I'm no rust expert but isn't this sort of thing exactly what traits handle well?

Not directly relevant.

Are the Rust devs not expanding the surface area of safe Rust over time? Just curious.

Sort of but also no. Intrusive lists are not likely to ever be possible in safe code, almost by definition.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.