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?
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/
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.