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

A lot of the syntax is incredibly similar to rust.


I'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.


The 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.


Yes, but Swift looks much cleaner thanks to ARC memory management. I wish Rust has something similar, all those sigils make it messy.


ARC 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.


What 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.


Could "'" count as type-parameter sigil for lifetimes? It could at least look like a sigil on a first look.


Isn'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.


err.. 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.




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

Search: