Re:Rust in 2018: easier to use
by littlestymaar on Sunday January 14, 2018 @07:36AM
(#16144009)
If Arc counts, then it juste sounds like Rust actually ;).
Re:Rust in 2018: easier to use
by Manishearth on Monday January 15, 2018 @12:54AM
(#16148783)
ARC, 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.
I 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.
Re:Rust in 2018: easier to use
by littlestymaar on Sunday January 14, 2018 @08:01AM
(#16144080)
If you use Arc everywhere you just end up with the same behavior than Swift (except for closures I guess).
Re:Rust in 2018: easier to use
by steveklabnik on Sunday January 14, 2018 @02:45PM
(#16145926)
Small note: Swift's ARC and Rust's Arc are different: Rust's Arc is atomic reference counting, while Swift's is automatic reference counting.
The 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).
Re:Rust in 2018: easier to use
by steveklabnik on Monday January 15, 2018 @08:21AM
(#16150282)
Yes, I should have elaborated more, thanks :)
(ARC, not tracing GC, but still.)