Slashdot Mirror


C Programming Language Hits a 15-Year Low On The TIOBE Index (businessinsider.com)

Gamoid writes: The venerable C programming language hit a 15-year low on the TIOBE Index, perhaps because more mobile- and web-friendly languages like Swift and Go are starting to eat its lunch. "The C programming language has a score of 11.303%, which is its lowest score ever since we started the TIOBE index back in 2001," writes Paul Jansen, manager of TIOBE Index. With that said, C is still the second most popular programming language in the world, behind only Java. Also worth noting as mentioned by Matt Weinberger via Business Insider, "C doesn't currently have a major corporate sponsor; Oracle makes a lot of money from Java; Apple pushes both Swift and Objective-C for building iPhone apps. But no big tech company is getting on stage and pushing C as the future of development. So C's problems could be marketing as much as anything."

2 of 232 comments (clear)

  1. Re:It's not a popularity contest by Dutch+Gun · · Score: 3, Interesting

    if I want something to run on most Linux distributions, as well as the BSDs with minor modifications, C is the obvious choice

    Well, C++ could make that same claim, as well as many other languages. In fact, some are arguably much *better* at cross-platform functionality.

    I think where C shines is that it's sort of a "common denominator" language. Just about every language (C++ included) can make use of a C library, or with minimal effort can create hooks into it, like with C#, Objective-C, Lua, or dozens of other languages that rely on low-level code for lots of their functionality. It's also a reasonably simple language, rather easy to wrap your head around (if written well), and is straightforward to learn, with power enough to get close to the metal when needed. So, if you write some code in C, just about anyone else can use it, even if they have to write a bit of "glue" first.

    That makes it a hell of a pragmatic choice for many projects, even considering C's more problematic aspects.

    --
    Irony: Agile development has too much intertia to be abandoned now.
  2. Re:problems, lol by jrbrtsn · · Score: 3, Interesting

    Exceptions are possible in C. See the documentation for setjmp() and longjmp().

    That said, exceptions are just "kicking the can down the road" for error handling. If a function call can fail, then you should check the return code. If you don't want to write with proper error reporting/recovery code immediately, there is always the assert() macro, e.g.:

    if(func_which_might_fail() == ERROR_OCCURRED) assert(0);

    If assert(0) gets called the program will stop immediately, and you can inspect the problem in detail with a debugger. Easy peasy.