3 ms·
This sounds like Swift :) (ARC, not tracing GC, but still.)
by Manishearth 9y ago
This sounds like Swift :)
(ARC, not tracing GC, but still.)
- littlestymaar 9y agoIf Arc counts, then it juste sounds like Rust actually ;).
- K0nserv 9y agoI dunno if I agree, the borrow checker in Rust requires a lot more active thinking and intervention to get memory right. Objective-C and Swift ARC is really straightforward and there are few gotchas. Kinda like GC.
- littlestymaar 9y agoIf you use Arc everywhere you just end up with the same behavior than Swift (except for closures I guess).
- steveklabnik 9y agoSmall note: Swift's ARC and Rust's Arc are different: Rust's Arc is atomic reference counting, while Swift's is automatic reference counting.
- dbaupp 9y agoThe acronyms are different, but at runtime they're pretty much the same: the only difference is the Swift compiler inserts the clones that a Rust programmer has to do manually (that is, Swift retain/releases are atomic too).
- steveklabnik 9y agoYes, I should have elaborated more, thanks :)
- Manishearth 9y agoARC, not Arc. ARC is automatic reference counting. Arc is Atomic reference counting. In Rust you still have to manually .clone() to addref an Arc. In swift you don't. This is a major difference ergonomics-wise.