We’re dedicating the month of March 2017 to the Swift Language.
Swift is one of the most loved languages by developers (if not the most loved). And this in a relatively short period of time after being released. I think this ascent can be explained by looking at how matters stood right before its introduction, when iOS and macOS developers spoke Objective-C. This was (and still is) a venerable language, actively used for more than 20 years. But its age was starting to show, especially when it came to its proneness to unsafe code (lack of type safety, null pointer exceptions, cumbersome error handling, the list goes on).
After taking your first few steps with Swift, you’d soon realise that this was a language designed by someone who was tired of Objective-C’s problems. The language was designed with code safety in mind: type safety, safe initialisation, value types, and many more things that were sorely missing from its predecessor.
Our language designer happened to be one of the world’s foremost compiler experts, with an appetite for taking over your responsibilities as a programmer – and that’s a good thing. If the error can be caught at compile time, it must be caught at compile time. Compile-time errors are always better than runtime errors; the latter is much more likely to affect your users.
More from this author
So I’d argue that the massive love for the language came mainly from the fact that we were clearly receiving an upgrade from Objective-C. Delivered as a surprise. It felt similar to your plane ticket spontaneously being upgraded to First class.
So far, the flight has been good. Certainly bumpy at times, with major language updates and other growing pains. But I think we’re flying higher and faster than before. The horizon looks promising: Swift can be used not just for building iOS apps, but for watchOS, tvOS, and server back-ends too.
The month’s articles should therefore appeal to mobile developers across all platforms. Swift is a good part of mobile.