4 ms·
Eh, at the end of the day, they're different languages and are following different paths. Sure they're superficially similar, but that's not all to it. Python
by Aatch 11y ago
Eh, at the end of the day, they're different languages and are following different paths. Sure they're superficially similar, but that's not all to it.
Python and Ruby are pretty similar languages overall, but neither has "killed" the other. Why? Because despite their similiarities, they offer different things. I generally prefer to use Python over Ruby, no real reason for it, I just prefer the language. With Rust and Swift, there are some pretty major differences that can't be waved away as personal preference, Rust's borrow-checker isn't something Swift can integrate overnight (and wouldn't likely do) and Rust can't just grow some ARC equivalent (and almost certainly won't).
And hey, some of my favorite minor features for Rust are cribbed from Swift. Namely `if let` and `while let`. I'm not scared of a little competition, keeps us on our toes and makes sure we keep looking for ways to improve the language and ecosystem.
- jpgvm 11y agoWhile I generally agree with the sentiment it's worth mentioning that Rust preceded Swift and any similarities are the result of the Swift designers being influenced by Rust, not the other way around. Rust also has the equivalent of ARC in the form of the Rc and Arc containers, Rc does reference counting without atomics, Arc with atomics (for when you need to do reference counting with thread safety).
- burntsushi 11y agoThe feature in question (`if let`) was added pretty recently. The RFC even mentions Swift! ;-) https://github.com/rust-lang/rfcs/blob/master/text/0160-if-let.md#detailed-design https://github.com/rust-lang/rfcs/blob/master/text/0160-if-l...
- sinistersnare 11y agoYup, we hard stole if-let from Swift ;). We even made it better!