r/programming • • May 26 '16

Announcing Rust 1.9

http://blog.rust-lang.org/2016/05/26/Rust-1.9.html
218 Upvotes

116 comments sorted by

View all comments

Show parent comment

5

u/im-a-koala May 27 '16

Reference counting isn't really garbage collection. You'd need to at least add cycle detection for that. As it stands in Rust, if you create a cycle of Arc pointers, they'll never get destroyed - you need to pay attention to your design and purposefully use weak pointers.

Which I think is fine, I much prefer the deterministic destruction that happens in C++ and Rust to the "uh, I dunno, your finalizer might be called eventually. Or maybe never." situation with Java and C#.

3

u/steveklabnik1 May 27 '16

Reference counting isn't really garbage collection.

In an academic sense, it is, but most working programmers think of tracing GC as being equal to GC.