Swift ascends the programming language ranks

The designated successor to Objective-C appears to be doing just was Apple designed it to do

Looking straight up a ladder to the sky.
Credit: Miguel Virkkunen Carvalho

Last summer, about 6 weeks after Apple introduced Swift, a new programming language designed to ultimately replace Objective-C as the language for iOS and OS X development, I wrote about how developers appeared to be quickly adopting Swift - or, at least, taking it for a serious spin. Now, more than 6 months after its release, comes more evidence from a number of sources that the interest in and use of Swift has continued to grow. Correspondingly, use of Objective-C has appeared to slow down and even begin to regress.

First off, the Popularity of Programming Languages Index (PYPL) named Swift its Programming Language of the Year for 2014. The PYPL index is based on web searches for tutorials about programming languages. In 2014, Swift saw the largest increase among all languages in its share of such searches, 2.9%. Swift is currently ranked #12 on PYPL with an overall share of 2.5%. Objective-C, on the other hand, while still ranked higher at #8 (the same spot it held one year ago) with a 6.1% share, is trending slightly downwards, with its share dropping by 0.2% in the past year.

Next, as I noted last week, the TIOBE Index of programming languages named JavaScript its Programming Language of 2014, but only after noting that Swift (along with R) looked like it was going to grab that title, before losing out to an end-of-year surge in interest in JavaScript. TIOBE, which ranks languages based on web searches, has Swift ranked #25 this month. Objective-C is currently ranked #3 on that index, the same spot it was in one year earlier, but is trending strongly downward; among TIOBE’s top 20 languages, it suffered the largest drop in overall share of web searches in the last year, -4.14%.

The most recent ranking of programming languages came from RedMonk last week, with the latest version of its semi-annual list. RedMonk, unlike PYPL and TIOBE, doesn’t look at web searches. Instead, it ranks languages based on a combination of interest on Stack Exchange and lines of code in GitHub. The January rankings saw Swift make a big jump from #68 in their previous rankings to #22, while Objective-C remains ranked #10. RedMonk editors felt that developer interest in Swift was still mostly educational, but expected use of Swift to continue to grow.

“... Swift’s growth is more obvious on StackOverflow than GitHub, where the most active Swift repositories are either educational or infrastructure in nature, but even so the growth has been remarkable. Given this dramatic ascension, it seems reasonable to expect that the Q3 rankings this year will see Swift as a Top 20 language.”

Looking more closely at GitHub data, Swift was ranked #18 among languages, based on the number of active repositories in Q4 2014; there were 11,138 active Swift repos during the quarter, 0.51% of all active repositories). This was an increase from 21st in Q3 (7,343 active repos, 0.37% share). The number of active Objective-C repositories increased slightly from Q3 to Q4 (36,471 to 36,568 in Q4), but its share of all active repos dropped from 1.8% in Q3 to 1.7% in Q4.

I did my own query of GitHub archive data to see about the rate at which new Swift and Objective-C repositories are being created. In Q3 2014, the average number of new (non-forked) Swift repositories created per day was 83; in Q4 it jumped to 118. Objective-C, on the other hand, saw its average number of new repos created per day drop from 308 in Q3 to 257 in Q4.

No matter how you slice it, it’s clear that usage of Swift is increasing, while usage of Objective-C is starting to decline. This is, of course, not surprising given Swift’s unique position of having been named as the new language of one the two most popular mobile platforms in the world. Still, it’s interesting to chart the rise of Swift at the expense of Objective-C, just as Apple designed it to do.

ITWorld DealPost: The best in tech deals and discounts.
Shop Tech Products at Amazon