The only gripe I remember with it is that all its APIs are weird.
Like instead of normal names, you have Apple-legacy-names for methods/classes.
The only gripe I remember with it is that all its APIs are weird.
Like instead of normal names, you have Apple-legacy-names for methods/classes.
On the other hand, Swift has (IMO) a much cleaner and less symbol-heavy syntax than Rust. Easier to read and write. Less of a culture of doing crazy metaprogramming/DSL definition with macros, and the builder DSL built into the language (which SwiftUI uses) is pretty nice and generates mostly understandable compile errors.
I actually like Apple's APIs, even the legacy ones. There's some weirdness, like how some file APIs want paths and some want URIs, but it's not that bad.
I've never got the chance to work with swift since their cross platform compatibility and "server-side swift" have been recent introductions.
In terms comparison, it really is the closest you can get to a rust that ARC BOX's everything (which has/ is planned to come down when lifetimes come in). You get a good runtime and good performance.
I believe a lot of the legacy names come from when your interfacing with platform APIs like UIKit and such if you have to and they haven't quiet gotten a bump from their Objective-C APIs to have more swifty-APIs.
If you just want to write A Thing, then it's up to your individual taste, what's available in the ecosystem, etc.
I don't think I'd push for it over Rust for those applications, but there is apparently wood behind the arrow internally.
Swift is good for business logic, like writing an app.
Rust is better for infrastructure, like writing a HTTP/3 server or Javascript VM.
Swift has an extremely good story about ABI stability, which makes sense when Apple ships a swift runtime and libraries as part of the OS, and needs the binaries to work across two dozen different major/minor releases.
Rust has up-front memory control primitives and options to remove the core library to cater to things like embedded systems development.
People have written apps in Rust, and Apple has written API backends and even device firmwares in Swift. I would argue both push against the ergonomics of the respective languages.