Become a fan of Slashdot on Facebook


Forgot your password?
Programming Apple

Objective-C Enters Top Ten In Language Popularity 351

bonch writes "Objective-C has entered the top 10 of the Tiobe Programming Community Index. Last year, it was at #39. The huge jump is attributed to its use in iPhone and iPad development. C, of which Objective-C is a strict superset, has reclaimed the #1 spot from Java, which slides to #2. Tiobe also explains how it determines its rankings."
This discussion has been archived. No new comments can be posted.

Objective-C Enters Top Ten In Language Popularity

Comments Filter:
  • wha...? (Score:4, Insightful)

    by Mark19960 ( 539856 ) <{moc.gnillibyrtnuocwol} {ta} {kraM}> on Wednesday June 02, 2010 @03:51PM (#32436354) Homepage Journal

    They use search engines to determine this?
    Why does this seem odd to me... or even misguided?

  • by localman57 ( 1340533 ) on Wednesday June 02, 2010 @03:54PM (#32436384)
    Embedded Systems. There's lots of work there. And we're getting more valuable all the time, because Universities are increasingly teaching C#, Java, etc. The number of people out there who can program a microprocessor right down to the metal is dropping each year.
  • by Panaflex ( 13191 ) <convivialdingo AT yahoo DOT com> on Wednesday June 02, 2010 @03:58PM (#32436450)

    They're everywhere! Sure, lots of people say they're writing C++ code (or, C code wrapped in C++), or application development. A lot of C development is OSS too - there's paid work in that area as well. There's TONS of maintenance work, especially in specialized industry controls, monitoring, whatever.

    In other words, it's all around you - just shrouded in mystery. Not many people advertise new C development, but oftentimes it is just a another tool in a developer's arsenal.

  • by 0racle ( 667029 ) on Wednesday June 02, 2010 @03:59PM (#32436462)
    I believe the answer is C.

    The answer is always C.
  • by IamTheRealMike ( 537420 ) on Wednesday June 02, 2010 @03:59PM (#32436472)
    Indeed they do:

    The ratings are calculated by counting hits of the most popular search engines. The search query that is used is

    +"[language] programming"

    From this I conclude that the results are meaningless. At best it shows that Objective-C programming has resulted in more discussions and questions. Whether it is "popular" or not is a bit more subjective.

  • by SanityInAnarchy ( 655584 ) <> on Wednesday June 02, 2010 @04:04PM (#32436536) Journal

    There is one popular computing platform that requires all programs to be written in Objective-C.

    Does it? I thought Apple allowed a few other languages, like plain C/C++...

    So if I want to develop an application for both of these platforms, in what language should I express the business logic of the application so that it can be automatically translated into Objective-C and into a CLR-friendly language?

    Unfortunately, the answer would probably be XML. Lots and lots of XML. Just make sure it's not Turing-complete...

    A saner answer (but one I like less) is to develop something which compiles Objective-C to CLR. Maybe it'd work at a higher level (compile Objective-C to C#), or maybe at a lower level (translate Objective-C bytecode to CLR), but either way, that's your only option, because the iStuff is the only platform which actually bans source language. If they found out you did it the other way around (starting in C# and compiling to Objective-C bytecode), they'd kill your app.

    That or just build a web app.

  • by Anonymous Coward on Wednesday June 02, 2010 @04:21PM (#32436740)

    All kidding aside, Objective-C isn't the sort of language people use because they want to. Rather, they use it because it's what Apple says they can use.

    Back in the NeXT days, we used it because it was far better than anything else out there. But that was 20 years ago. Times have changed, and we have better programming languages available to us. Even with Objective-C 2.0, it's still somewhat of a relic.

    So it's popularity isn't natural. It's almost fully artificial, based upon the restricted nature of Apple's platforms, especially the mobile platforms where they've literally "outlawed" everything else.

  • by dgatwood ( 11270 ) on Wednesday June 02, 2010 @04:29PM (#32436846) Homepage Journal

    You will, however, almost certainly not share a single line of UI code between a .Net application and an iPhone application anyway. Even if you could write Objective-C code for .Net, you wouldn't be able to make UIKit calls on the other device, making it a moot point. Likewise, even if you could write code in C# for iPhone, you would not have support for Windows UI calls.

    The way you write code in situations like this is an abstraction layer. You write the core code in C or C++, then write an iPhone UI in Objective-C and a WinMo UI in... whatever, and similarly abstract out file reads/writes, etc. You write custom OS-specific code near the boundaries between the OS and your app, then write the core code in a language that's cross-platform.

    For maximum convenience, you should also consider using Core Foundation where possible. You can build and include CFLite for the other devices, and as long as you restrict yourself to that subset of the API, you'll be fine. And on the iPhone side, you can then take advantage of toll-free bridging to use most of those CF objects as though they were the equivalent NS (Foundation) objects.

  • by DrXym ( 126579 ) on Wednesday June 02, 2010 @04:29PM (#32436848)
    Go for a C++ job then. Or suck it up and learn a few languages.

    The reason Java and other languages are more prominent these days is because they are more suitable for most business requirements - reliability, scalability, portability etc. Unless an app has to hit the metal, or has hard speed / memory / CPU requirements, chances are C is not the right language to write in any more.

  • by Demonantis ( 1340557 ) on Wednesday June 02, 2010 @04:30PM (#32436868)
    I think popular topic would mean popular language at least to some degree. Or for sure that it is a more used language as search results wouldn't discriminate preferences like actually enjoying the language. Neat to see and know, but wouldn't use it for any significant business related decisions is how I see it.
  • by ceeam ( 39911 ) on Wednesday June 02, 2010 @04:35PM (#32436920)

    > Times have changed, and we have better programming languages available to us.

    That's interesting. And if I'd ask you to name another compiled language with dynamic message routing/dispatch it would be what? C libs compatibility is desired.

  • by Moridineas ( 213502 ) on Wednesday June 02, 2010 @04:37PM (#32436950) Journal

    Somewhat interesting to look at (e.g.) the Wolfenstein 3D iphone see just how little Objective-C there can be!

  • by blair1q ( 305137 ) on Wednesday June 02, 2010 @04:49PM (#32437100) Journal

    A sign of any real application architecture is that it can't.

    The problem isn't in the abstractions in the middle of the program. Those can generally be translated all over the place.

    The problem is at the edges, where the program has to interface with the system (and via the system with the user and other peripherals).

    Not many languages abstract those things in ways that allow applications to just drop in. Which is why everywhere you go someone has come up with the idea of an abstraction layer, so their goodies aren't strongly coupled to a platform in a way that prevents them from moving to a new platform.

    This isn't limited to porting between languages. Even in one language, porting between systems gives you the idea to put in an abstraction layer, thinking all you'll have to do is reimplement that layer for the next system.

    And the concept of an operating system is a successful example of such a layer, but of course nobody gets that, so they have to abstract a layer between the app and the OS as well.

    I've made a good living working around those mistakes.

  • by Sycraft-fu ( 314770 ) on Wednesday June 02, 2010 @04:50PM (#32437134)


    Objective-C has a lot of buzz, since Apple has a lot of buzz. That doesn't mean it is getting used in a lot of projects, just that a lot of people are talking about it. Just because there isn't a lot of chatter online about something, doesn't mean it isn't used.

    For example I suspect C++ is actually much higher. Why? Because it is the language of video games by and large. Pretty much any PC and Xbox 360 game are written in C++, usually using Visual Studio. However you don't see a lot of chatter about it online since it is being done professionally and it just kind of an assumed thing in the games industry.

    Well, that makes for a rather large amount of apps out there, even if they don't get talked about all that much.

    Likewise, though I suspect C is high up on the list due to embedded applications, I think that their data on it is flawed. The reason they see so much is likely Linux, which of course uses a lot of C. Fine, but Linux also gets talked about a lot online, since it is open source. So the amount of discussion it generates in relation to code is much higher than a commercial project.

    In general their methods are rather flawed.

  • by Anonymous Coward on Wednesday June 02, 2010 @05:08PM (#32437324)

    I disagree that this is the opposite of how it should be. The 3.3.3 terms are designed to prevent people from writing "least common denominator" user interfaces that don't look or behave appropriately for an iPhone app. If you want to make a good interface for your application you should be writing it separately for each platform. The only real exception is games which generally implement their own UI using OpenGL, so they don't have a problem.

    Core logic should be written in a way that it can be used on multiple platforms, which usually means C or C++. I don't see a problem there, though it would be better to have other options like C# (MonoTouch) as well.

    Business logic, that which binds things together, unfortunately is alienated by this because you will have to write in a low level language. The only high level scripting language permitted is JavaScript, and you'll have to jump through hoops to use that outside the context of WebKit. Python, Lua, Ruby, etc. are out, which is a shame.

  • by Sycraft-fu ( 314770 ) on Wednesday June 02, 2010 @05:57PM (#32437920)

    I've never understood why Apple has such an obsession with Objective C. To me it really does seem like being different for the sake of being different. In the event they really felt like a new language was needed, well, they should have made one (as MS did in the case of C#). Otherwise it makes sense to use C and C++. They produce fast code, they are well supported, lots of programmers know them, etc. To me it seems highly sensible to use C for extremely low level things (like OS kernels), C++ for speed critical/native apps (like much of the rest of an OS) and then a managed language for those things where speed is not important.

  • by maccodemonkey ( 1438585 ) on Wednesday June 02, 2010 @08:39PM (#32439504)

    iPhone however does have KVO, KVN, and dynamically generated keys (valueForKey, setValueForKey), all of which doesn't work with linking by address.

    You are supposed to write your network code using CFNetwork and BSD sockets. This is as intended. This is also why Cocoa sockets are actually just loosely wrapped CoreFoundation sockets.

    Obj-C is like a screwdriver. You're trying to use a screwdriver like a hammer, and then loudly complaining about it. I'm telling you it's a screwdriver, not a hammer, and that's how it's intended.

    Obj-C is a language for quickly building GUIs. It's not a language for programming the logic. Apple recommends you use C for logic. Apple codes Cocoa itself in C and C++. Obj-C was in no way and shape build for performance situations. That doesn't mean it's a bad language. The things you regard as deficiencies actually make it an extremely strong language for GUI construction. This is also why Apple doesn't try to force you to use ONLY Obj-C.

    Storing objects by name is an EXTREMELY important feature in Obj-C. Yes, it's slow, but as I've said, don't use Obj-C for performance code.

  • by Anonymous Coward on Wednesday June 02, 2010 @08:44PM (#32439532)

    I have been using Objective-C for 22 years. I have written two well regarded programming books. I am writing another one now that emphasizes ANSI C on iPhone OS devices. It is not necessary to write more than a few lines of Objective C when developing iPhone applications.

    I am a C++ guru. I prefer Objective-C.

    I manage a large commercial software product that contains a lot of Java code as well as C/C++. I prefer Objective-C.

  • by shutdown -p now ( 807394 ) on Wednesday June 02, 2010 @08:53PM (#32439600) Journal

    There is one popular computing platform that requires all programs to be written in Objective-C. There is another popular computing platform that requires all programs to be written in one of the many languages that compile to verifiably type-safe CLR bytecode, but Objective-C is not one of those languages. So if I want to develop an application for both of these platforms, in what language should I express the business logic of the application so that it can be automatically translated into Objective-C and into a CLR-friendly language?

    Quite obviously, a subset of Objective-C that can be compiled to verifiably type-safe bytecode (actually, the correct requirement is "memory-safe"; IL is not particularly typesafe even when it's verifiable - e.g. it lets you declare a union of overlapping int and float, and that will be verifiable).

    Is such a subset possible? I dare say I am an expert on IL, but definitely not on Obj-C, so I couldn't say for sure; but from what I know about it, it's quite possible. All Obj-C constructs seem to be mappable; the problem is with C stuff such as pointers. So, basically, if you can live with just non-pointer and non-array primitive types (structs & unions are ok) and Cocoa classes, this should be mappable. Actually, even pointers are mappable if they're only used for byref parameter passing, with no pointer arithmetic involved, and no fields of pointer types in structs or classes.

    Ultimately, it all hinges on the question of whether there are any Cocoa APIs which do not fit the restrictions outlined above, and which you can't avoid using while developing an iPhone app. Can anyone knowledgeable clarify that part?

    Come to think of it, even if there are some, they can still be wrapped into higher-level Obj-C code, and then your app coded against that higher-level API.

  • by shutdown -p now ( 807394 ) on Wednesday June 02, 2010 @08:54PM (#32439614) Journal

    You believe wrong. Unrestricted ANSI C is not compilable to verifiably memory-safe IL, because unchecked pointer arithmetic, in particular, is not memory-safe.

  • by furball ( 2853 ) on Wednesday June 02, 2010 @08:56PM (#32439640) Journal

    I've never understood why Apple has such an obsession with Objective C

    Allow me to explain.

    1. Who owns the language spec? What if there was a modification needed to the language to meet the needs of Apple's hardware that's going to be released to consumers? For example, blocks. How fast could Apple introduce something like that if the language spec was owned by ... for purpose of example, Oracle?

    2. Who owns the runtime? See question 1.

    Objective-C gives Apple the flexibility to make changes as needed to meet their needs without waiting on some standards body or another corporation to get in the way. Apple will not walk away from Objective-C for these reasons.

  • Re:Lines of code (Score:3, Insightful)

    by Lars T. ( 470328 ) <.moc.liamelgoog. .ta. .regearT.sraL.> on Wednesday June 02, 2010 @09:25PM (#32439842) Journal

    I think any useful statistics on a programming language would have to include something on the amount of code written in it and project complexity.

    I have a feeling that the popularity of a programming language is actually inversely proportional to the LOC needed for a given task - unless you get paid for LOC.

  • by swillden ( 191260 ) <> on Wednesday June 02, 2010 @11:40PM (#32440364) Homepage Journal

    Sorry to troll, but what exactly is a "strict superset"? A superset is a set that contains another set, in this case Objective-C contains C; all of it. If it didn't contain all of C, then it wouldn't be a superset at all. So what makes a superset strict?

    A simple analogy:

    "Strict superset" is to "superset" as ">" is to ">=".

    Technically, yes. That's what it means in a math class or a logic class. But that's not what "strict" means in this context.

    What it means here is that Objective-C is a superset, in the sense that any legal and correct C program is a legal and correct Objective-C program that does the same thing. So the "strict" adjective is technically redundant. The reason it isn't redundant in practice is because other languages (notably C++) are close enough to being supersets of C that they're called supersets of C, even though there are some C programs that are not valid in those languages, or that are valid but work differently.

    So, basically, the situation is that "superset" in this context has been abused a little bit, applied to languages that are almost but not quite supersets. So for Objective-C we say it's a strict superset to mean that it actually is a superset.

    Were the meaning what you suggested, the "strict" adjective would be unnecessary, because the only language that is a superset of C but not a strict superset (I'm using the terms correctly here, not loosely as they have been misapplied to C++, etc.) is C itself.

    Of course, for any of the above to make sense, you also have to specify which version of C you're referring to, and you have to pick one that Objective-C actually is a superset of.

  • by Moridineas ( 213502 ) on Thursday June 03, 2010 @01:09AM (#32440898) Journal

    You're missing the point. The point is not that Objective C is somehow "closer" to Java or not (in reality it's "closer" to Smalltalk), the point is that valid C code is valid Objective C code. That's what "Objective C is a superset of C" means.

  • by pookemon ( 909195 ) on Thursday June 03, 2010 @01:15AM (#32440944) Homepage
    yeah - I'm betting that 90% of the Java questions are "Why the f*** is this happening?" and "Are the java team on drugs?" or "I'm using Netbeans for my java development and it just f***ed everything - are the Netbeans developers on the same drugs as the java devs?"

    Hardly a measure of it's popularity.
  • by bar-agent ( 698856 ) on Thursday June 03, 2010 @03:02AM (#32441570)

    Now that you mention it, KVC/KVO is another one of ridiculous and wasteful (on end user's CPU & programmer's time) "features" of the Cocoa API. Passing simple numeric arguments of time critical functions (such as animation control) as ascii string objects (not just ascii strings, but malloced strings, which need to be parsed & converted into binary integer/float then free-ed) is utter idiocy. If you wish to get file properties, they return you malloced ascii dictionary of ascii name-value pairs, for size, time date,... (all in ascii pairs that need to be parsed back to binary values that your code needs). It's beyond stupid.

    What? No. What you describe would indeed be stupid, but that's not what happens.

    All string literals are shared compile-time constants. You can use @"color" in seven different places and they all refer to the exact same address. So you aren't interpreting ASCII strings, but simply doing a pointer comparison. The only time they need to be parsed is when they are part of a key path, like @"moulding.color", and there is a separate function for evaluating key paths so that the common case is easily optimized.

    Furthermore, key values like 13.5 or 2010-May-23 are not stored or passed around in ASCII form, but wrapped in an NSValue object or a subclass, similar to Java's Integer objects.

  • by mdwh2 ( 535323 ) on Thursday June 03, 2010 @09:29AM (#32443744) Journal

    I also wonder why the story is all about Objective C (complete with the obligatory Iphone and Ipad Slashvertisement), when obviously there are 9 other languages in the top 10. Do they all get a story too? Seems like Slashdot is becoming more and more like an Apple news site...

  • by mdwh2 ( 535323 ) on Thursday June 03, 2010 @09:58AM (#32444016) Journal

    Well Qt won't run on the Amiga either. Clearly, no solution is going to work for 100% of platforms, since there'll always be platforms that don't support it (even for things like Java, that are intended to run on "anything", they aren't supported on everything).

    Covering Windows, Mac, Linux, Symbian is the vast majority of computing platforms out there. True, he won't cover that 5% of the phone market (in fact, a lot more of the phone market, since there's more than just Symbian and IphoneOS). Is there a solution that does better than Qt? (The only one I can think of is Java, in that it'll run on billions of Java phones, perhaps 90+% of the phone market; no, the Apple phones aren't capable of supporting Java either, but there you are.)

  • by DragonWriter ( 970822 ) on Thursday June 03, 2010 @12:22PM (#32446082)

    Objective C is much closer to Java than to C.

    All valid C code is valid Objective C code (well, all C code as of the standard at the time Objective-C was created -- I'm not sure to what extent Objective C has tracked evolution of the C standard.)

    Almost no substantial valid Java code is also valid Objective C code.

The relative importance of files depends on their cost in terms of the human effort needed to regenerate them. -- T.A. Dolotta