Re:Why Rust Is the Future of Game Development
by steveklabnik on Monday November 09, 2020 @02:41PM
(#25038922)
You can do these things safely, you just can't do them safely and efficiently at the same time. You could do a doubly linked list with reference counting, and it would be in safe code, it just wouldn't be classic implementation you'd be imagining, and not as efficient.
[ Parent
| on HN ]
Re:Why Rust Is the Future of Game Development
by worik on Monday November 09, 2020 @03:01PM
(#25039194)
You can do circular structures like doubly linked lists in Rust. You can do them efficiently. But you do need to use "unsafe". Of course you do, a moments thought shows you why.
It is not as "safe" as Rust without "unsafe" blocks, but it is still reasonably safe.
But circular structures are usually a bad choice.