Image missing.
Swift is a more convenient Rust (2023)

created: Jan. 31, 2026, 10:05 p.m. | updated: Feb. 1, 2026, 6:51 a.m.

Rust is faster by default, Swift is simpler and easier by default. This is what a match statement looks like in Rust:enum Coin {Penny ,Nickel ,Dime ,Quarter ,}fn value_in_cents ( coin : Coin ) -> u8 {match coin {Coin :: Penny => 1 ,Coin :: Nickel => 5 ,Coin :: Dime => 10 ,Coin :: Quarter => 25 ,}}Here’s how that same code would be written in Swift:enum Coin {case pennycase nickelcase dimecase quarter}func valueInCents ( coin : Coin) -> Int {switch coin {case . Since, it is a recursive type, Rust will force you to use something like Box<> for referencing a type within itself. This is because Rust is fast by default, and lets you be slow, while Swift is easy by default and lets you be fast. It’s still early days for Swift as a good, more convenient, Rust alternative for cross-platform development, but it is here now.

9 hours, 10 minutes ago: Hacker News