3 ms·
Yes, but Swift looks much cleaner thanks to ARC memory management. I wish Rust has something similar, all those sigils make it messy.
by gulpahum 12y ago
Yes, but Swift looks much cleaner thanks to ARC memory management. I wish Rust has something similar, all those sigils make it messy.
- pcwalton 12y agoWhat sigils? All Rust has is & now. Using ARC removes control from the programmer and has a significant runtime overhead (atomic reference counts), which violates Rust's zero-overhead principle. What Swift works well when you need deep Objective-C integration, of course.
- phaylon 12y agoCould "'" count as type-parameter sigil for lifetimes? It could at least look like a sigil on a first look.
- kvark 12y agoerr.. Rust doesn't have neither '@' or '~' any more. And there is "std::rc::Rc<T>" in case you want reference counting. A big fat difference is that you are not forced to use it.
- TheCoelacanth 12y agoIsn't that essentially what Rc<T> or Gc<T> are? Rust obviously can't get rid of the other types, since safe manual memory management is one of their core use cases, but it does support automatic memory management.
- fra 12y agoARC is the reason Swift won't make it into the systems programming world. I - a firmware engineer - am glad Rust team stuck to their guns and kept it 0 overhead.