Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Learning rust with entirely too many linked lists (2019).
Backlinks as weak links work. It's not symmetrical, but it's sound. Forward links then must be Rc<RefCell<T>> links, while backlinks are Rc<Weak<T>>.
This also generalizes to the thread safe form, Arc<Mutex<T>>.
There are no comments on this comment yet.
Backlinks as weak links work. It's not symmetrical, but it's sound. Forward links then must be Rc<RefCell<T>> links, while backlinks are Rc<Weak<T>>.
This also generalizes to the thread safe form, Arc<Mutex<T>>.