Nobody should have been surprised of the word ‘Swift’ been trending topic last week. As soon as Craig Federighi introduced it during the WWDC 2014 thousands of developers have written about it, some of them scared, some excited, some disappointed but, as always happens with Apple, the whole community of developers had its opinion.
The very first thing that came to my mind was the word that starts with “sh” with a lot of “i” but after ten deep breaths I realized it was not that bad: I thought Swift would replace Objective-C and all of us should learn it to keep developing iOS apps, but fortunately the final result is that Swift is an ally we can take advantage of to improve some Objective-C’s weaknesses and is not going to substitute Objective-C (at least for a while). In fact, we can combine both languages at the same time and I think it’s one of its most amazing features.
For new developers, Swift is an incentive as this programming language has been designed to be fashionable, leaving behind many of the things that make Objective-C look old (and I’m not talking just about the letter “C”). Apple seems to have paid attention to the newest languages and to have learnt about which of their features make developers love them. They have applied these features to Swift and I’m sure it will attract a lot of new developers from lightweight and scripting languages.
With Swift you will be able to write the same source code using less lines, less files, and less time. It makes easier former tedious tasks such as working with text strings, ‘switch’ instructions, or Unicode characters and, furthermore, it allows you to write functions inside other functions. In short, Swift gives you more freedom, removes distractions when developing and helps you keeping your focus on what you’re developing in spite of on how you’re doing it.
Although I’m very excited about the introduction of Swift in the iOS ecosystem, I’m still cautious and I’ll keep reading all the news regarding this programming language to know which will be its future and how will affect us. Maybe we’re witnessing the beginning of a beautiful relationship or the beginning of the end of Objective-C. Who knows?
This is an article by Jorge Jordán, writer and developer for www.insaneplatypusgames.com.