Should You Learn Swift Or Objective-C As A Beginner App Developer? [UPDATED]
Last Updated: April 9, 2017.
It’s a hot topic on Quora: Should I learn Objective-C or Swift? In 2015, a year after Swift was released, I gave an account of Swift’s popularity and a recommendation for beginner app developers. What’s changed since then?
What is Swift?
In June 2014 Swift first appeared, a new programming language made by Apple’s Chris Lattner. You can use it to create apps for Apple’s iOS and Mac operating systems. It aims to create an easier programming environment for beginners as well as giving experienced app developers better tools for programming. Over the course of a few years the language has matured and its still rising in popularity. Apple’s not new to designing programming languages, they’ve done so on several occasions since Wozniak’s BASIC.
The big blogs shout that Swift “is it” and is going to change the way we make apps while opinions from in the field say the opposite. Experienced developers say Swift’s giving them features Objective-C never had. Professional freelance developer Chris Hulbert says this:
“Swift was certainly a suprise when they announced it at WWDC not so long ago! However, it is still looking too immature for medium-to-large projects. Issues such as taking minutes to compile medium-sized projects, Xcode relentlessly crashing, runtime bugs, and the many other frustrations you can read about in the Apple dev forums all rule it out for day-to-day use, and as such all i’ve seen is people toe-dipping in the new language by using it for small utility classes or maybe one or two view controllers.”
Get complementary access to my course, Zero to App Store, and learn how you can build a real-time chat app with Firebase and Swift!
Reportedly, LinkedIn built an entire app in Swift. Although it kinda looks like shiny media coverage, it sure tells: We’re LinkedIn, and we trust this new language Swift for a serious project.
The great networking library for iOS, AFNetworking, has a popular Swift equivalent: Alamofire. In about one year of its existence Alamofire has amassed 14.000 stars, while in five years AFNetworking raked in no more than 21.000.
Choose Swift Or Objective-C?
First, you have to understand why Apple created Swift.
Some say it’s to cut of Android, others say it’s because it was time to replace Objective-C with something new. Some say Swift is supposed to be the C++ killer, i.e. replace C++ as the go-to systems programming language.
Apple’s company culture and vision says something else: an obsession with end-to-end design and seamless hardware-software-development integration. After reading Steve Jobs’ biography, you can figure Apple must have fully adopted Jobs’ philosophy: create products that are designed well, even the parts you don’t see, and don’t give people direct access to those parts. iOS is still a closed system, right? No, Apple is telling you what to love!
But where does the Swift vs Objective-C balance stand for beginner app developers? I gave the following advice to Dale Grant, a Quora user, in January 2015, almost a year ago.
Yes, I think Objective-C is better than Swift for making professional apps. But don’t make any decision based on that yet, let me explain.
The Objective-C language gets critiqued a lot because it’s hard to learn as a beginner. Apple manages the transition from Objective-C to Swift by introducing intercompatibility thanks to Objective-C header files in Swift.
Swift is new and young. In the past few Xcode updates, there were major updates to Swift itself. There’s no guarantee your code will keep working in new versions of Xcode, which can be a dealbreaker for beginner coders because they’d run into unnecessary and frustrating bugs all the time. When learning something new, you need to see that it works to stay motivated, not that it breaks for nothing.
Swift is a particularly good choice for beginner app developers. The language is easier to learn compared to Objective-C, and has many features that’ll grow with you as you build more complex apps. Swift’s large adoption rate makes courses, programming help, and libraries widely available – so you’re not alone in learning Swift. Since Swift 3 the language has become much more stable, introducing less “breaking changes” in language updates. If you keep updating your knowledge about Swift every time an update comes out (about once a year), you’ll have no problem staying ahead of the curve.
What Has Changed Since Swift’s Inception?
Let’s look at the facts:
- GitHub hosts over 68.239 active code repositories written in Swift.
- The TIOBE index of programming language popularity lists Swift as the 10th most popular language, compared to 14th in 2016. Moreover, Objective-C dropped from 3rd (2015) place to 16th!
- In Redmonks popularity index, Swift made 11th place in the top 20 most popular languages in January 2017.
Swift is great for learning app development and especially if you want to figure out if making apps is something for you. It is clearly taking over in terms of popularity, if it hasn’t already galvanized its position as a Top 10 language.
Although many established companies still use Objective-C as their main language, Swift has replaced Objective-C as the de facto language for iOS app programming. In startups, bootcamps and indie dev shops,
Enjoyed this post? Feel free to share!
Most Popular Content
- How To Develop iOS Apps On A Windows PC
- How To: Build A Real-Time Chat App With Firebase And Swift
- How To: Random Numbers in Swift
- Creating A Simple iOS Game With Swift In Xcode (Part 1)
- How To: Pass Data Between View Controllers In Swift (Extended)
- Grand Central Dispatch: Multi-Threading With Swift
- Understanding The “Use of Unresolved Identifier” Error In Xcode