|
|
|
|
|
by WorldMaker
52 days ago
|
|
GC is a similar but different set of strict ownership rules (and its own versions of being forced to think about reference invariants). There's an inherently interesting Venn Diagram overlap between Rust borrow mechanics and GC, they aren't entirely separate worlds. They are more like related worlds with slightly different trade-offs. (Similarly there's C# and .NET actively exploring GC-safe relatives of Rust's borrow mechanics in Memory<T>/Span<T> space right now, to great effect.) In terms of practical, yeah a doubly linked list (or trees with bidirectional pointers to both parent and children, etc) is especially easier to implement in a GC environment than with Rust borrow checking alone. You can do it without a GC, but a GC can be a helpful intermediary. |
|