this is unnecessarily negative towards swift.
no single language is the best language for doing everything, and you shouldn’t try to look for one language that “does everything”. different languages are different tools and different tools are for different things.
for example, python is a great tool for doing things that have to interact with files and operating systems. you can write the same code to do the same thing in swift, but it’s going to be way easier to write it in python.
on the other end of the stack, CUDA/C++ is a great tool for doing things that have to run on a GPU. you could write the same code to do the same thing in swift, but it’s going to be way easier to write it in CUDA.
swift is a systems programming language. it mainly competes with (in order of popularity):
- C++
- C
- go
- rust
it would not be a good idea to use swift as a front end language unless you are doing something that really requires close-to-the-metal performance, like a browser game, in which case you could use something like SwiftWasm. in most cases, you’re better off using a common front end language, like typescript.
among the languages that swift competes with, i think that swift is a better option than many of the alternatives. although nobody here likes to admit it, swift is a C-based language, and it can interop with just about anything speaks C. since swift compiles to machine code, it can also call assembly instructions, which the swift-png
library uses to power hardware accelerated PNG decoding in pure swift.
unlike rust, swift has a large intrinsic user base, since Apple protects and promotes it within its (largely closed) ecosystem.
it’s hard to hire swift developers, and it’s very hard to hire experienced swift developers. this is a reason to learn swift, because swift is a valuable skill, which is in very high demand right now.
this is likely why swift developers are among the most highly paid specialists among major languages, and why it was one of the fastest-appreciating languages by wage growth from 2021–22.
unfortunately many of the most experienced members of our community have an excessive amount of familiarity with the cutting edge of the language, where compilers and apps break, and have opted to take an intellectually honest approach to the shortcomings of the language, which all programming languages have.
this is good for the long term health of the language, but counterproductive (and misleading) to tell beginners just getting started with systems and server-side programming. maybe this is why new developers are 35% less likely to choose swift, but 72% more likely to choose C++, when compared to professional developers.