I have been programming for donkeys years now. I was intrigued when Apple originally announced a new programming language. I downloaded the Swift Programming Language Guide as an ebook and was immediately impressed with the language. There was a lot to like about the langauge. But, it wasn't of much interest at that time because I (rightly for the time) thought, it's not going to be much use to me because "I don't do desktop/app development and why would I get tied to a propreitary langauge in 20xx?". Now (2017) things have changed quite a bit.
Why I would like to learn, program in Swift and enthused enough to write this journal:
- Swift is Cross-platform. [^cross]
- Swift is Natively compiled. You can distribute small, self-contained binaries.
- Uses the proven and solid LLVM compiler toolchain [^llvm]
- Do not need a Mac anymore to write Swift programs [^mac]
- You can use your favorite editors (vim, emacs, Visual Studio Code, atom) [^xcode]
- There are a handful of web frameworks for Swift -- Kitura by IBM [^ibm], Vapor, Perfect etc.,
- Apple wants to make Swift a general puropose programming langauge and considers server side programming very important for the langage's success. [^server]
- It has the right pedigree. Chris Lattner (who is now at Tesla, but still stewarding the langauge) was previously known for his work on LLVM. Slava Pestov, the creator of Factor programming langauge is on the Swift team.
- It has the large corporate support. Most successful langauges like Java, C#, Go have had large commercial enterprises backing them with their marketing clout. Having world's largest Software company backing a language is a good thing. Which might make some people uncomfortable. but..
- It is also developed in the open. On github
- swift-evolution maintains proposals for changes and user-visible enhancements to the Swift Programming Language.
- It has attracted proponents of other langauges (eg: Graydon Hoare of Rust fame) to contribute to the langauge.
- It has already developed enough following (TIOBE #10 in 2017) that the eco-system will continue to grow.
- It is not a niche langauge unlike say Clojure, Erlang. Nor constrained by VMs like Scala, F#.
- The syntax is friendly enough to do scripting.
- It has static typing that does not come in your way.
- It has decent type inferencing to make life easy.
- The Swift package manager, though arrived late on the scene, is easy and good enough. I don't have to explain why it's a good idea not to have a package manager (cough... go.. cough...)
- The interoperability with C libraries is fantastic.
My primary interest in Swift in building web services, command line applications etc., I'm curious to see how this plays out.
[^cross]: Though Apple only makes packages available for latest versions of Ubuntu along with MacOS (of course). [^llvm]: which has emerged as a very popular alternative to GNU, especially with Apple and various BSD Unix. [^xcode]: You don't have to use XCode! [^server]: See Swift.org - Server APIs Project [^ibm]: I was taken aback by the amount of support IBM is pouring into Swift. This is not unprecedented. IBM also invested heavily into Java. [^mac]: I'm writing this post on a Mac, and I use Macs everyday. But, I want to deploy stuff on to Linux, not Macs.