February 2016: The Current State Of Swift
Recently there were some interesting reports and articles about the state of Swift. In this post we will discuss them and put them in perspective.
Swift in the App Store
@ryanolsonk has published two awesome blog posts recently. This one investigates how many apps in the top 100 are using Swift already. He did this by analysing the corresponding IPA files. The result: Just 11% of the apps in the top 100 have used Swift yet. However, you have to put this into context: A lot of apps in the top 100 have been there already before the introduction of Swift, so they have been written Objective-C. And I think there is no point in migrating Objective-C projects to Swift.
Swift in Apple Apps
@ryanolsonk‘s second blog post is about the question “Is Apple using Swift”? And again, the answer seems a little bit disappointing at first: Only the calculator app contains Swift code. But again: Why should you migrate Objective-C projects to Swift?
Swift in the TIOBE Index
There are also some interesting changes going on in the TIOBE index. But what is the TIOBE index? Wikipedia says:
TIOBE programming community index is a measure of popularity of programming languages, created and maintained by the TIOBE Company based in Eindhoven, the Netherlands. […] The index is calculated from number of search engine results for queries containing the name of the language. The index covers searches in Google, Google Blogs, MSN, Yahoo!, Baidu, Wikipedia and YouTube. The index is updated once a month. […]
According to the site, TIOBE index is “not about the best programming language or the language in which most lines of code have been written”. However the site does claim that the number of web pages may reflect the number of skilled engineers, courses and jobs worldwide.
Indexes of this kind are of course a little bit controversial, but the TIOBE index is the most known of its kind, so I think that the index does have a significance.
And recently Swift has overtaken Objective-C:
With Swift’s open-source release in December, its meteoric rise since it was first announced in 2014 continues. Before the announcement, Swift’s position in the TIOBE index in November 2015 had clibmed up to 15th in the chart, sitting just below Objective-C, Apple’s key language for iOS and OSX development.
[…]
The subsequent entry in the TIOBE index shows Swift and Objective-C trading places, with Swift moving up to position 14 and Objective-C being demoted to position 15.
[…]
By the end of 2016 it is likely that Objective-C will have dropped out of the top twenty list, and Swift is likely to be vying for places in the top half of the table; and it’s likely that 2016 will see Swift as being marked TIOBE’s language of the year.
This is a remarkable development – especially if you consider how young Swift still is.
What do iOS developers think about Swift?
@NatashaTheRobot did a very interesting poll last month on Twitter:
iOS Devs: For a new job, would you work at a company has no plans to transition to Swift? #swiftlang #iosdev
— NatashaTheRobot (@NatashaTheRobot) January 4, 2016
That’s a very interesting result and it shows that most of the iOS developers are very thrilled about Swift. This fact alone shows the direction in which iOS development is going.
But it is also interesting what’s happening on the most important iOS development blogs like
In fact new posts are almost always written completely in Swift.
Breaking code
Of course there is one point that could discourage developers from using Swift: Existing code broke with Swift 1.2 and Swift 2.0. And it will break again with Swift 3.0. However, you have to make adjustments with each new iOS version anyway, so that this shouldn’t be overrated. And I think Swift code is less error-prone than Objective-C code so that it’s difficult to say whether the migration process takes more time than you have saved by using Swift instead of Objective-C.
References
Title Image: @ enterlinedesign / shutterstock.com
Should You Use Objective-C Or Swift?
Should You Migrate Objective-C Code To Swift?
The Swift Programming Language (Swift 2.1) – Apple Inc.