Is Swift basically like Rust except without the borrow checker and with garbage collection?
-
Is Swift basically like Rust except without the borrow checker and with garbage collection?
Is it something that in the near future commercial interests could adopt for (broadly) backend programming on Linux, such as Go and Python are used for today? I don't really like either (Go feels uninspired and tedious, and Python is ... well, I don't like dynamic typing, and opt-in typing is meh.)
I really love Rust, and its type system, but... [1/?]
-
Alexandra Magin π³οΈβπreplied to Alexandra Magin π³οΈβπ last edited by
The memory strictness in Rust is a hard sell in a lot of common commercial situations.
Languages I admire but which are also a hard sell:
- Haskell: execution model is harder for most people to reason about -- https://dr-knz.net/abstract-machine-models.html
- OCaml/F#/SML: a bit easier than Haskell, but "weird syntax" to most peopleYes, I really want to unseat the dominance of Python and Go (and Java) in kinda generic Linux backend/infrastructure stuff.
[2/2] -
Alexandra Magin π³οΈβπreplied to Alexandra Magin π³οΈβπ last edited by
Okay, I have been reminded Swift does reference counting (which was good enough for Perl)
Mostly I'm tired of all the golang and python I have to deal with and would love to see a good language replace it
-
Jenniferplusplusreplied to Alexandra Magin π³οΈβπ last edited by
@recursive can I recommend C#?
I genuinely struggle to find any reason not to recommend it for most any server usage, other than the close connection to Microsoft. But they're not substantially worse than Google or Apple
-
Alexandra Magin π³οΈβπreplied to Jenniferplusplus last edited by
@jenniferplusplus I'd have to look at it's type system more closely.
-
Emily Fox :verifiedtrans:βreplied to Alexandra Magin π³οΈβπ last edited by
@recursive Caveat: I've used neither Swift nor Rust professionally, and I've written quite a bit more Rust than Swift.
On top of what some others have said, I feel like Swift has an easier to onboard concurrency system. Itβs a more baked into the language with actors and structured concurrency/scoping stuff, and you don't need to pick an executor or learn about Futures. On the other hand, Rust's seems much more flexible.
-
Hrefna (DHC)replied to Emily Fox :verifiedtrans:β last edited by [email protected]
I've described Rust's as like trying to summit K2. To me it's one of the single hardest parts of dealing with the language.
It _is_ incredibly flexible, but that flexibility comes at a significant onboarding, training, and reading cost. That is neither good nor badβit's a choice, albeit not one I would have madeβand there have been tools and libraries published to make it easier, but it is still rough.