Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Reference counting is a form of garbage collection [1] [2], as I've explained numerous times before. It has been considered a form of GC since the original papers in the 1960s and I see no reason to revisit that definition now.

To track the lifetimes of objects, Swift programs perform operations (reference count manipulation) at runtime. That's because the Swift compiler does not know the static lifetimes of objects, unlike Rust. It can optimize away some reference count traffic, but this doesn't change the basic system: semantically, all objects are reference counted.

[1]: https://en.m.wikipedia.org/wiki/Reference_counting

[2]: http://www.memorymanagement.org/glossary/a.html#term-automat...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: