Thursday, February 4, 2016

Introduction to Swift Playground

In the Worldwide Developer Conference 2014, Apple surprised all iOS developers by launching a new programming language called Swift. Swift is advertised as a "fast, modern, safe, interactive" programming language. The language is easier to learn and comes with features to make programming more productive.

Prior to the announcement of Swift, iOS apps were primarily written in Objective-C. The language has been around for more than 20 years and was chosen by Apple as the primary programming language for Mac and iOS development. I've talked to many aspiring iOS developers. A majority of them said Objective-C was hard to learn and its syntax looked weird. Simply put, the code scares some beginners off from learning iOS programming.

The release of Swift programming language is probably Apple's answer to some of these
comments. The syntax is much cleaner and easier to read. I have been programming in Swift since its beta release. So it's more than a year for now. I can say you're almost guaranteed to be more productive using Swift. It definitely speeds up the development process. Once you get used to Swift programming, it would be really hard for you to switch back to Objective-C.

It seems to me that Swift will lure more web developers to build apps. If you're a web developer with some programming experience on any scripting languages, you can leverage your existing expertise to gain knowledge on developing iOS apps. It would be fairly easy for you to pick up Swift. Being that said, even if you're a total beginner with no prior programming experience, you'll also find the language friendlier and feel more comfortable to develop apps in Swift.

In June 2015, Apple announced Swift 2, and that the programming language goes open source. This is a huge deal. Later, you will be able to use Swift on Linux, and probably some days, you can use Swift to develop Android apps. Who knows?! Along with the big news, the new version of the programming language has some nice features (such as error handling, protocol extensions and availability checking) to enable developers to write better and more beautiful code. More importantly, with the release of Xcode 7, it would further improve the learning experience of the language. You will understand what I mean in a while. 

No comments:

Post a Comment