14 ms·
Yes, a primary stated goal of Rust is "memory safety without garbage collection." I'm not aware of any other language for which this is a top priority.
by kyllo 12y ago
Yes, a primary stated goal of Rust is "memory safety without garbage collection." I'm not aware of any other language for which this is a top priority.
- pcwalton 12y agoIt's because it's an extremely delicate balance (considering reference counting a form of GC, which it is): you have to carefully design the entire language around it in order to get the safe expressiveness that Rust provides. It'd be very hard to retrofit onto an existing design and match Rust's expressiveness.
- cpeterso 12y agoHow does Rust deal with reference cycles?
- steveklabnik 12y agoBy giving you enough tools that referencing counting isn't what you reach for. If you do need it, though, we use weak and strong pointers.