There are numerous reasons that are pretty convincing to me personally. As a consultant I also list similar reasons to my clients when we discuss languages to use for their code:
- Swift can be as fast as C or C++ code, and also allows calling C code directly if needed. Compare this to Java, which requires JNI wrappers or Node.js/Python, which require binary wrappers for any interaction with C. Swift is also a much higher level language than C or C++ with safe memory access by default, while still allowing to go lower level to work with pointers when needed (including interactions with C libraries).
- Compared to all of these widely used languages, Swift's type system is much more advanced and is more on par with Scala or Rust. At the same time Swift has a strong focus on the progressive disclosure principle: you don't have to learn the advanced features and you can still be quite productive on many levels without going too deep into generics and associated types etc.
- Swift has efficient memory management without the overhead of garbage collection. Swift's memory management is predictable and deterministic. Compare this to Java/JVM and any other garbage-collected language in general, in which the runtime might initiate a garbage collection pause at the most inconvenient moment and freeze everything when you're serving a customer request.
- If you already build iOS apps in Swift, you don't need to learn a different language or ecosystem. In my personal experience, full-stack development is a great time saver when it's available. Even when separate Swift developers are working on the mobile/desktop app and server code, you can share a lot of the code, usually related to the model layer.
- Similarly, if your backend already utilizes TensorFlow or Python, you might be interested in Swift for TensorFlow or Swift's interop with Python for data engineering and data science tasks. While there might be less code sharing, there are a lot of benefits in using a strongly typed language for these tasks and catch many of the possible errors in compile time as compared to run time.
Swift is also available on other platforms such as Android, and Windows port is becoming more mature. I'm looking forward to using Swift for whatever I need to implement on any of the platforms. It has a very good balance in terms of the learning curve and performance of the generated code, the best balance of all widely available languages, in my opinion. While developer tools for some of the platforms can be improved, using Swift on other platforms is definitely worth checking out, especially the server-side as it had the most time to develop since the moment that Swift was open-sourced.