4 ms·
A lot of the syntax is incredibly similar to rust.
by fra 12y ago
A lot of the syntax is incredibly similar to rust.
- JamesSwift 12y agoI've been looking into Rust recently, so I wasn't sure if it was just the freshness in my mind or what. Glad to see I wasn't imagining things.
- kibwen 12y agoThe syntax is so similar that I'm quite curious to know whether the Swift developers have been watching us from afar. :) That said, it could just as easily be convergent evolution... which would be quite an impressive validation of our syntax decisions.
- gulpahum 12y agoYes, 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.