Swift is a more convenient Rust

Swift vs Rust: ergonomics and use cases

  • Many see Swift as more convenient/less noisy than Rust, with similar “modern systems language” features (enums with data, strong types, pattern matching).
  • Others argue Rust’s Result + ? error-handling and explicitness are actually more ergonomic in large systems.
  • Several commenters use Swift successfully for systems/embedded work (network protocols, embedded Linux logic) and like it much more than C.
  • Some say the real comparison set is Swift vs C#/Go/Java, and Rust vs C++/Zig, not Swift vs Rust directly.

Cross‑platform story and ecosystem

  • Major criticism: Swift outside Apple platforms is perceived as second‑ or third‑class.
  • Foundation and SwiftUI lag on non‑Apple OSes; many Swift libraries implicitly assume iOS/macOS APIs.
  • People note IBM’s earlier retreat from Swift on the server as a bad signal.
  • Others counter that Swift Foundation has improved, Linux/Windows/Android support is growing, and Swift 6 may be strong for cross‑platform, but perception lags.

Tooling and developer experience

  • Xcode is widely viewed as the “default,” but many dislike it; alternatives (VS Code + SourceKit-LSP, etc.) feel clunky or fragile.
  • On macOS, Swift without Xcode is possible but not as smooth (e.g., swift test issues without Xcode).
  • Rust’s toolchain (rustc + cargo + rust‑analyzer) is praised for working reliably across OS versions and machines.

Memory management, ownership, and safety

  • Long debate over terminology:
    • Rust: affine/ownership type system, RAII, no GC by default; often called “automatic” memory management in practice.
    • Swift: ARC (ref counting), deterministic but still a form of garbage collection in a broad sense.
  • Some argue Rust’s big contribution is mainstreaming non‑GC, ownership‑based safety; others stress prior research and older languages.
  • Swift 6 adds a more explicit ownership system and stronger concurrency checking, aiming at data‑race safety.

Performance, binary size, and compilation

  • Multiple reports that Swift binaries are large; Embedded Swift may help but is early.
  • Some find Swift slower than Rust unless compiled with unchecked optimizations.
  • Rust and .NET NativeAOT are cited as having good single‑binary, AOT stories; Swift’s cross‑target single‑binary story exists but is under‑documented.

Interop and scripting ecosystem

  • Swift has strong C/C++/Objective‑C interop; Rust’s C interop is good, C++ harder but improving.
  • Several commenters say Rust wins today for Python/JS extension integration (pyo3, maturin, etc.), which drives adoption in the “scripting plus native core” world.
  • Swift’s FFI for being called from Python/JS/Ruby/PHP is possible via C ABI exports, but tooling, docs, and community patterns are much less mature.