Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
amelius
· 2mo ago · 0 comments
Now try to do them in safe Rust.
Comments
[–]
afdbcreid
2mo ago
Easy.
https://docs.rs/intrusive-collections
.
[–]
cryptonector
2mo ago
The issue is that back-links in data structures are inherently difficult to handle a thread-safe way in mutators.
[–]
afdbcreid
2mo ago
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).
[–]
amelius
OP
2mo ago
Importing a library does not count. (Besides, perhaps you can tell but I don't even know if the library uses safe Rust internally.)
[–]
afdbcreid
2mo ago
Internally? No. Externally? Yes. That is the point.
[–]
gbromios
2mo ago
I'm no rust expert but isn't this sort of thing exactly what traits handle well?
[–]
steveklabnik
2mo ago
Not directly relevant.
[–]
nick_
2mo ago
Are the Rust devs not expanding the surface area of safe Rust over time? Just curious.
[–]
steveklabnik
2mo ago
Sort of but also no. Intrusive lists are not likely to ever be possible in safe code, almost by definition.