HACKER Q&A
📣 amichail

Why was the fish shell rewritten in Rust instead of Swift?


Wouldn't Swift be fast enough and result in more elegant and shorter source code?


  👤 steveklabnik Accepted Answer ✓
Here's the canonical description of "why Rust" https://github.com/fish-shell/fish-shell/pull/9512#issuecomm...

See also https://github.com/fish-shell/fish-shell/pull/9512#discussio...

> Let me put a swift lid on that (and any other discussions of other programming languages, including swift).

>

> Rust has the momentum, some of us already know it and others are interested in it.


👤 talldayo
Swift doesn't support most OSes as well as Rust does. It also has a smaller/worse standard library and much fewer developers. According to StackOverflow, Rust users outnumbered Swift-using respondents 2:1. Rust learners outnumbered Swift learners 4:1: https://survey.stackoverflow.co/2024/technology/

👤 isodev
I can't speak for the fish shell project - from my pov, Swift is technically a marketing tool Apple uses to keep developers focused on their platforms. It's a lock-in thing. Indie developers love to post about it because it gives them engagement but Apple has a poor track record with open-source projects. I wouldn't reach for Swift for anything important.