by JeffKilborn · 11y ago · 0 comments
No, it's optional if you don't need to interact with Obj-C frameworks (ie. Cocoa). And memory is not managed dynamically. Swift uses ARC.
Like I said, I just don't see Rust sticking around for long. Swift will suck all the developers out of it since you'll be able to actually get a job programming in Swift.
If anything, Rust is the only modern language that's not threatened by Swift, by virtue of existing at a level of the stack that's so low as to be out of Swift's reach. I agree that Swift is going to be huge, but you're mistaken as to who its competitors are. :P
Rust provides dynamic memory management too, but you aren't forced to use it and most use it for a few variables only.
So far nothing I've seen about Swift tells me that it will be able to be used for things like Servo and other perf-critical applications. Yes, it might edge out Rust webdev, but not much more.
"You cam get a job in swift" is largely due to its iOS backing. I'm not so sure how that's going to apply to other OSs especially if Cocoa and co aren't made open source.
let foo = Moves::new();
if condition { mem::drop(foo) }
// should foo be dropped here?
In practice many destructors can probably be scheduled statically at compile time.(And I like Swift and think their development team is really cool.)