Conversation

Is there a dialect whose approach to memory management is similar to the borrow checker?

1
0
0

@mauve No. See: https://www.dai.ed.ac.uk/groups/aisoc/magazine/issue1/koans.html [the background make it unreadable...] 'One day a student came to Moon and said, "I understand how to make a better garbage collector. We must keep a reference count of the pointers to each cons." Moon patiently told the student the following story-

"One day a student came to Moon and said, "I understand how to make a better garbage collector...

[note: pure reference-count garbage collectors have problems with circular structures that point to themselves.]'

1
0
0

@mauve (You can't make cycling structures in Rust without at least one unsafe. So actually even doubly linked lists are unsafe. I am annoyed by this, but also... nobody in 2025 should be writing their own linked list code. Which is also why serious people still need to understand C at a deep level)

1
0
0
@mcr314 @mauve and anytime this comes up, the obligatory book on the topic.. https://rust-unofficial.github.io/too-many-lists/. 😀
0
0
1