Objective-C Overtakes C++ in Programming Language Popularity

 
 
By Darryl K. Taft  |  Posted 2012-07-06
 
 
 

Objective-C, the language of the Apple world of iOS and the Mac, has overtaken C++ in a key index that measures the most popular programming languages in use today.

The TIOBE programming community index shows Objective-C as the third most popular programming language behind first-place C and second-place Java, suggesting that the popularity of mobile development is outpacing that of enterprise app development and building large high-performance systems€”where Java and C++ typically reign. Both Java and C++ showed declining use in the July 2012 TIOBE index.

Both Objective-C and C++ started in 1983 as object-oriented successors of the C languages. €œRight from the beginning, Objective-C and C++ competed to become the de facto object-oriented programming language,€ TIOBE said. It took quite some years before C++ could claim victory. Now Objective-C is back€”thanks to the iPhone and iPad, but not as a direct competitor of C++ any more. C++ is used heavily in large high-performance systems whereas Objective-C is mainly used in the mobile apps industry.

€œIt is interesting to note that both Java and C++ are losing ground while Objective-C is gaining significantly,€ said Don Babcock, a software engineer at Wake Forest University Health Services. €œI've always disliked C and C++ because of all the €˜warts€™ [pointers, memory management hassles, etc.] and I'm a longtime fan of Java [ever since the 1.1 days]. However, my new favorite language is Objective-C because it has all of the best advantages of both.€

Moreover, Objective-C is compiled for a specific architecture so it's fast but doesn't run in a virtual machine (VM), Babcock said. €œHowever, this is hardly an issue. The same code compiles for Mac [Intel] and for iOS [ARM]. Different binaries, but that's just a matter of having a compiler. Native code will always win the speed/size race over VMs. The important point here is that the programmer doesn't care. They just select the desired hardware target and go. So the code can be written once and used elsewhere. That's admittedly not the same as running the identical binary anywhere, but if performance counts, you get a better result with native code.€

Performance-wise, €œObjective-C typically will blow the doors off C++/Java because it ends up being bad-fast C code under the covers,€ Babcock added. €œSo from my perspective, I get the performance of bad fast C code with the convenience and efficiency of programming in a sane, object-oriented [OO] language.€

In a recent keynote at QCon New York 2012, Cameron Purdy, vice president of development for Oracle€™s application server group, spoke on how Java supplanted C++. Babcock argues that many of the same reasons Java beat back C++ are now why Objective-C is rising up the charts.

TechCrunch€™sAlex Williams was among the first to hop on this trend, noting that he believes polyglot programming platform as a service (PaaS) plays such as VMware€™s Cloud Foundry and Red Hat€™s OpenShift may become useful for developers as they offer support for a variety of languages.

€œThe key here is that Objective-C gives me the ease of programming in OO and the API richness of Java with the speed and performance of C/C++,€ Babcock said. €œIt provides automatic memory management without the disadvantages of garbage collection. The same language gives me desktop and mobile platforms. Combined with an OS that supports dispatching, I can write my program once and have it optimally executed and take advantage of as many cores as the hardware has to offer without prior knowledge of the CPU configuration.€

The TIOBE Programming Community index is an indicator of the popularity of programming languages. The index is updated once a month. The ratings are based on the number of skilled engineers worldwide, courses and third-party vendors. The popular search engines Google, Bing, Yahoo, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings.

Rocket Fuel