4 ms·
You just essentially described Swift
by skohan 5y ago
You just essentially described Swift
- gwbas1c 5y agoSwift is more like C# or Java than Rust. It's more like adapting C# to the objective C runtime than Rust. It's also not memory safe. It's very easy to crash the process.
- uniqueid 5y agoWhether or not Swift succeeds at being memory-safe, in theory, it's supposed to be.
- user-the-name 5y agoAbsolutely not. Both Swift and Rust are actively taking inspiration from each other.
- skohan 5y agoI just totally disagree. Swift might look a bit more like C#, but in terms of features it's way more similar to Rust for all the ADT-related features mentioned in the grandparent comment. Also, regarding memory safety, it's not as safe as Rust - it's basically only memory-safe in the single-threaded context, but it's still relatively safe compared to other languages. I don't really find it easier to crash than Rust - thanks to optionals you get the same guarantees against NPE's. You can choose not to take advantage of it, but you can also force-unwrap in Rust if you want.
- codetrotter 5y agoI feel much at home with Swift, and it is my other favorite language to use besides Rust. I use Rust for server-side things and command-line utilities and Swift for iOS and macOS apps. I know that server-side Swift is a thing that some people do. But I don't feel that Swift would be what I am personally looking for server-side, so I maintain my dream of faster development in Rust with a subset of Rust and a custom compiler :) In fact I would like to be able to integrate Swift and Rust so that I could also use Rust in my iOS and macOS apps directly. But for now and for the types of applications that I am currently working on it is not worth going down that particular route. But in the future I wish to write some games where I want to write all of the game logic in Rust and use Swift + Metal for the rendering.