Why Apple’s Swift is a game changer
MANILA, Philippines — The biggest announcement at Apple's recently concluded Worldwide Developers Conference (WWDC) was neither a new gadget nor an innovative new operating system (OS) but something only developers will immediately understand and users only eventually benefit from: a new programming language called Swift.
If the mighty applause of the mostly-developer audience of WWDC was any indication, Apple's announcement of this new programming language is huge. As a developer of iOS apps myself, the initial reaction was to immediately prepare myself for the disruption that was about to happen.
The way things are today
There are currently 1.2 million apps available in the iOS App Store, in spite of the steep technical skill and cost hurdles involved in building apps.
The main programming language used to build most apps is Objective-C, which is based on the C programming language. Objective-C, picked up mostly by those who take up Computer Science in college, is not as easy to learn as scripting languages such as Python or Ruby, which can be self-learned by just by about anyone.
Although there have been many attempts at building compelling apps using these web technologies, giants like Facebook and LinkedIn that have experimented with this approach realized that the user experience hasn’t been that great. Apps that look, work and feel great tend to be native (or at least hybrid with strategic use of web views). And so for iOS, the best way to build native apps has been to code using the more complex Objective-C.
Swift is not just an easier programming language to complement Objective-C. On the contrary, it seems to be positioned as a total replacement for Objective-C. Swift feels like a scripting language like Python and Ruby and has features of modern programming languages; developers will be more familiar with terms such as closures, generics, and namespaces, and unlike Objective-C, Swift has all these, but I will not discuss them here on purpose. It is easier to learn than Objective-C, and requires far fewer characters to type and fewer files to create. Even my 15 year old son is now able to study and play with it on his own and is enjoying it.
Swift is also safer to use. There will be fewer errors involving use of wrong data types even if you don't have to specify the data type of each variable, because Swift's compiler will already know the type of the variables you are using based on your code (this is known as type inference). In addition, your app will be protected from unexpected crashes due to poor memory management as Swift will do this tedious task for you. Debugging for crashes caused by memory handling is extremely difficult; reducing the developer's responsibility for memory management will have a huge impact on quality and productivity.
Swift provides a scripting alternative to building native iOS apps; scripting was only available through web-based frameworks like Phonegap and Appcelerator's Titanium with varying success. Unlike the web-based counterparts though, Swift is clearly not cross-platform.
Finally, there is an interactive playground to test your code before implementing it, so you could prototype quickly and already test code snippets first before committing to the larger code base for your app. The interactive playground allows you to type a few lines of code and already see the output in real time; no need to wait for compilation and deployment of the app just to test small portions of code.
During the WWDC keynote, Apple showed initial performance figures of Swift compared with Objective-C and Python, and Swift easily beats both. From all indications, the old notion of scripting languages being slower doesn't hold in this case, so there is no catch in using Swift, other than that it is new.
What does this all mean?
The entry of Swift will affect you in different ways:
If you are just an iPhone or iPad user looking for great apps you can expect more choices to flood the App Store. Swift lowers technical skills and cost barriers, hence more apps.
If you've been wanting to produce great apps now's the time. Think of developers with a solid understanding of Objective C as specialists that may be harder to find or may cost more. Better yet, learn Swift yourself and save on development costs altogether.
If you already have apps in the App Store, you can expect more apps to compete with yours for attention. If your app is already doing great, don't be surprised to see new apps trying to copy what you already have. Now's the time to revisit your digital marketing strategies to make sure your app gets the attention. Also consider using Swift to your advantage by gradually rewriting portions of your code to lower maintenance and update costs and to protect yourself from obsolescence should Apple decide to downplay Objective-C in the future.
If you already develop iOS apps for a living, your decision to develop expertise in Objective-C may have served you well these past few years. Your heavy investment in Objective-C will still be an asset (and Swift and Objective-C code can work together), but it will no longer be your main competitive advantage. All of a sudden with Swift, almost anyone with the right tools can be an iOS developer. The new entrant could either be a competitor or a low-cost subcontractor, depending on how you view the situation. You will need to review your value proposition and find other areas to differentiate youserlf.
If design is your main strength, focus on great User Experience, especially if you've already had years of experience and success in this area. Use Swift to take advantage of rapid prototyping for shorter feedback loops during usability design and testing.
If your expertise is technology, focus on developing great front-end to back-end integration know-how and experience. Strengthen your position in areas like security, performance and stability. Knowledge of database management and access to various cloud-based systems will also help differentiate you in a big way too.
Apple has started to push Swift as the programming language for building compelling iOS and Mac OS applications. iOS 8 itself has new APIs (including HomeKit for home automation and HealthKit for services related to health). These are open areas up for grabs and Swift simply resets the playing field for everyone. – Rappler.com