Slashdot Mirror


Is The C Programming Language Declining In Popularity? (dice.com)

An anonymous reader writes: Java overtook C as the most popular language in mid-2015 on the TIOBE Programming Community index. But now over the last 13 months, they show C's popularity consistently dropping more and more. C's score had hovered between 15% and 20% for over 15 years but as 2016 ended, the language's popularity is now down to 8.7%. "There is no clear way back to the top," reports the site, asking what happened to C? "It is not a language that you think of while writing programs for popular fields such as mobile apps or websites, it is not evolving that much and there is no big company promoting the language."

But the Insights blog at Dice.com counters that TIOBE "has hammered on C for quite some time. Earlier this year, it again emphasized how C is 'hardly suitable for the booming fields of web and mobile app development.' That being said, job postings on Dice (as well as rankings compiled by other organizations) suggest there's still widespread demand for C, which can be used in everything from operating systems to data-intensive applications, and serves many programmers well as an intermediate language."

i-programmer suggests this could just be an artifact of the way TIOBE calculates language popularity (by totaling search engine queries). Noting that Assembly language rose into TIOBE's top 10 this year, their editor wrote, "Perhaps it is something to do with the poor state of assembly language documentation that spurs on increasingly desperate searches for more information." Maybe C programmers are just referring to their K&R book instead of searching for solutions online?

38 of 286 comments (clear)

  1. In Korea ... by Anonymous Coward · · Score: 2, Funny

    ... C is only for old people!

  2. We're all programming in Machine Code by Big+Hairy+Ian · · Score: 4, Insightful

    Bear in mind almost all of the rival languages were written in C themselves and C is written in machine code most of us are programming in C and Machine Code anyway. In the end we're all writing Machine Code we've just wrapped it up in a nicer package is all

    --

    Build a Man a Fire, and He'll Be Warm for a Day. Set a Man on Fire, and He'll Be Warm for the Rest of His Life.

  3. Oh gosh by Anonymous Coward · · Score: 2, Insightful

    Not again.

  4. Re:We're all programming in Machine Code by Anonymous Coward · · Score: 2, Interesting

    Your compiler is programming in machine code. You just feed it hints.

    Feed your compiler some good hints and it might even write code to use the full width of those vector registers your processor has but you were ignoring.

  5. Search engine? by denisbergeron · · Score: 4, Insightful

    Everybody that work recently with C IDE knows that you don't need search the web to find information !

    --
    Ceci n'est pas une Signature !
    1. Re:Search engine? by Anonymous Coward · · Score: 3, Insightful

      Even without an IDE.

      C is simple enough not to need a lot of searching to find out how to do things - unlike nearly all the OO languages.

      Assembly got searched for more due to the shift from Intel to ARM. Also searches for Intel assembly grow due to all the crap intel has had to add to a poor instruction design to maintain "compatibility". If the RISC underpinnings of the X86 (both 32 and 64 bit lines) were accessible the speed would increase by 10-15%.

    2. Re:Search engine? by Waffle+Iron · · Score: 2

      If C developers aren't searching for C info, they ought to be. People may think that C is simple, but it's full of hidden gotchas.

      For example, strncpy() doesn't actually do what any reasonable person would assume it does. Using it in the wrong "obvious" way can result in bugs that won't easily be found during testing. There are hundreds more land mines like that sprinkled throughout the C ecosystem, and they all need to be reviewed repeatedly before one can be considered an experienced developer.

    3. Re:Search engine? by Waffle+Iron · · Score: 2

      That's nice that you have the optional local documentation installed for the C libraries, so you can find out that strncpy() doesn't do what any reasonable person would assume it does without searching the web. (Do you have the POSIX versions installed as well? Sometimes it conflicts with the Linux version, and both can be extremely vague. For those entries, you might have to start searching the web.)

      Not to mention that many if not most of the gotchas are in the core language, and man pages won't help you much there.

  6. Bullshit metrics by _merlin · · Score: 5, Insightful

    I don't use much straight C these days (mostly C++ with bits of Python, lua, PHP and other stuff for glue, and occasional C#), but the metric is bullshit. It's a measure of which languages are most suited to passing roadblocks using search queries including the language name. This tends to select for how much a language is used by inexperienced developers.

    I'm a pretty experienced C++ developer, so I'm unlikely to be putting C++ in search engine queries. I know the language and library pretty well. If I want to get reference for a particular standard library feature, I'll use a query like, "codecvt site:en.cppreference.com". If I want docs for a Linux feature (e.g. routing sockets or the capabilities API), I'll pull up a man page. If I want to know what some ioctl does and the docs are lacking, I'll look at the Linux kernel source. I'm not typing C++ into google when I'm doing my day job or open source work. Same applies for other programming languages I'm competent with. I do bits of assembly language, but I'm not typing that into Google. I have user mode architecture manuals for the processors I need to deal with, and ABI manuals for the operating systems.

    On the other hand, I'm far more likely to put the name of a language I'm less familiar with and only use occasionally into a search query when I'm trying to find the conventional way to do something. Something like "C# confirm close modified document window", "python open subprocess stderr", or "php openssl rsa". I'm a clueless goon when it comes to available libraries and best practices for these languages, so I boost their TIOBE rankings on the occasions when I have to use them, while my bread-and-butter C++, assembly language and C don't show up, despite working in C++ for the bulk of my programming time.

    1. Re:Bullshit metrics by Solandri · · Score: 4, Interesting

      I'll add that every C/C++ IDE I've used has really good built-in documentation and search features. I've rarely felt the need to google something when programming in C/C++.

      OTOH when I was writing stuff in Perl or PHP, I was googling stuff constantly because the documentation is online and the sites' search feature sucks.

    2. Re:Bullshit metrics by GrumpySteen · · Score: 4, Interesting

      Search engine metrics are also flawed in another way; the worst examples of things often generate a lot of searches, but that doesn't mean they're popular. This metric would tell us that the most popular financial company is Wells Fargo. They're at the top because of the news that they created millions of fraudulent accounts, however, and not because they're popular.

  7. C is dying... by Anonymous Coward · · Score: 4, Funny

    C is dying, Slashdot confirms it!

  8. I'm seeing a resurgence in C by dottrap · · Score: 5, Interesting

    I'm seeing a resurgence in C. It seems to be coming from several different directions.

    The first is from people like Mike Acton:
    CppCon 2014: Data Oriented Design
    https://www.youtube.com/watch?...

    The second is from all the new languages like Go, Rust, Swift. All these new languages need libraries so they all built in good C interoperability so they could be useful immediately without requiring ground up new implementations of everything. So I'm seeing more new pure C libraries being created now than I've seen in a very long time. Library developers know that their libraries will be usable from every language if they write it in pure C.

    The third is from IoT. Embedded developers never left C. Now with IoT growing, C lives on.

    In all of these cases, they might fly under TIOBE's radar. Most of these people probably don't need to search for C. They already know it and are too busy working on their projects.

    1. Re:I'm seeing a resurgence in C by EmeraldBot · · Score: 5, Informative

      "New languages"?

      Pssht! As if!

      Man, there's so many varieties of Object-Oriented C you could jizz your pants without even touching yourself.

      C is the Primal Language. Before C we have clicks and whistles.

      This isn't even a fucking conversation. I'm not hearing what anybody says except my own opinion, because I know my opinion is right, so this isn't a conversation.

      What did that dude say in "Fight Club"? "This. Conversation. Is. Over."? Right? Well man thissuh conuhversationuh isuh nottah happenun.

      This is some bullshit. Fuck, there are HLA interpreters that are more popular than JAVA -- WITH PEOPLE WHO KNOW HOW TO CODE.

      Man this is so much bullshit. I can't believe there's no viewpoint, no slant, no perspective, no synonym of whatsoever with this article.

      That's the new owners of Slashdot. This site is dead. If you can diss C because some homie of yours called you up and needed some help raising interest in some particular market, towards a hopeful stock point, maybe on some IPO to come, maybe on something pre-existing, then fuck it, it ain't news any more, man, and it ain't for anybody but the "business school" {nested: "nerds"}.

      When you say things like "This isn't even a fucking conversation. I'm not hearing what anybody says except my own opinion, because I know my opinion is right, so this isn't a conversation" and "What did that dude say in 'Fight Club'? 'This. Conversation. Is. Over.'? Right? Well man thissuh conuhversationuh isuh nottah happenun.", It becomes blindingly obvious you are either high on drugs, drunk with some shots I would pay to learn the composition of, or suffer an untreated case of a narcissistic personality disorder combined with the temperament of a three year old, because this is a public. forum, not your personal soapbox. You want to rant on about how unfair a major index has ranked a language you imply you know very little about, without any rational debate, feel free to take it to your Twitter page.

      Oh. And uh, while I personally believe it's unethical to provoke those who are (at least at present) mentally incapacitated, I thought I should show you a little what the previous owners of Slashdot, Dice, ran a few years ago. I can sense the sound of your head exploding, eh?

      --
      "Set a man a fire, he'll be warm for the rest of the night. Set a man afire, he'll be warm for the rest of his life."
    2. Re:I'm seeing a resurgence in C by darthsilun · · Score: 5, Informative

      C is the Primal Language. Before C we have clicks and whistles.

      Before C we had B, and APL, PL/1, Cobol, and Fortran, just to name a few.
      Come up for air sometime, it really helps clear your head.

    3. Re: I'm seeing a resurgence in C by Trailer+Trash · · Score: 2

      And lisp, don't forget that.

    4. Re:I'm seeing a resurgence in C by darthsilun · · Score: 2

      Before C we had B

      Are you Brian Kernighan?

      No

      Brian has a beard. I don't.

  9. My problems programming in C aren't C related. by Rufty · · Score: 3, Interesting

    They're much more like: "Why does processor X on board Y rev1 have I2C on those pins, but on rev2 accessing those causes a reboot. Who thought that was a good idea? Can I LART them? And how can I detect board version in software?"

    --
    Red to red, black to black. Switch it on, but stand well back.
    1. Re:My problems programming in C aren't C related. by serviscope_minor · · Score: 2

      And how can I detect board version in software?

      Try accessing the I2C pins. If you get a reboot then you know you're on rev 2.

      --
      SJW n. One who posts facts.
  10. The problem with the metric by isj · · Score: 3, Informative

    "i-programmer suggests this could just be an artifact of the way TIOBE calculates language popularity (by totaling search engine queries). "

    The TIOBE index is not based on the number of queires (see http://www.tiobe.com/tiobe-ind...).

    It is based on the number of results on the query " programming" in multiple search engines.

    So the TIOBE index is "how much has been written online about "

  11. Betteridge's law by fnj · · Score: 3, Insightful

    Betteridge's law of headlines. Answer is no. HELL no. Hell no, you royal asshole. Discussion terminated. OK?

  12. Re:We're all programming in Machine Code by truedfx · · Score: 5, Insightful

    C compilers haven't been written in machine code or even assembly for a long time, aside from a rare few. They've been written in C themselves for a while, but today's most common C compilers are written in C++.

  13. Re:Fuck You New Slashdot Owners, Fuck You by EmeraldBot · · Score: 4, Insightful

    You're so busy fucking yourselves, maybe all you need is a good hearty fuck you to shut your stupid ass the fuck up.

    Really contributes to the discussion, a fantastic way to convince someone you are a reasonable person with a well thought out position.

    Why don't you go ask mother fucking ANSI what they think about C's popularity?

    I'm not sure what ANSI is supposed to help us, all they do is set standards. May as well as IEEE what they think of TCP's popularity.

    Why don't you go around and check to see what code is compiling and executing?

    This is so vague as to being entirely meaningless, but alright. Javascript is considered the world's #1 compiled language. Java bytecode comes after. Maybe Shell scripting or Python after that. Aside from how asinine and useless those measures are, since they tell you nothing about its popularity with developers, it seems awfully strange to pick a fight with a language that is only ever compiled once and never formally executed in its original form.

    Why don't you fucking just learn a tiny little bit about the history of programming languages and their derivatives

    I'm not sure what the history of programming languages is supposed to do about what today's measures are, given that how it scored in the past has little bearing on how useful it is today. I'm completely confused as to what you even mean by that, or why you even put it in here. Perhaps, because like the rest of your post, it was entirely devoid of any rational point or argument?

    your stupid caking piehole about shit that you shouldn't even be propagandizing about, stop dumbing people the fuck down, and just to reiterate, the the fucking holy hell up?

    You state things much more bluntly then I would like, but at its core, perhaps yes. If you have nothing to contribute, take your meds, knock yourself out, and stop vomiting yourself all over this page.

    --
    "Set a man a fire, he'll be warm for the rest of the night. Set a man afire, he'll be warm for the rest of his life."
  14. Re:Does it really matter? by inflex · · Score: 2

    C for modern microcontrollers is a good mix. Easy to access bit-level operations (port control, bit bashing etc) but providing structured programming framework with easier debugging (libraries, function calls, interrupts, even portability to other architectures).

    I code ASM for quite a few when needed (ie things like the Attiny5/10 due to stack limitations ) but realistically doing it in C makes the end-to-end development process a lot smoother.

    The compiler will out optimise the human in almost all cases, and if you have a specific block that you absolutely have to code in ASM then you can simply inline it within the C. If you need to ilk out that last few bytes in the flash then it's often cheaper to bump to the next uC size than pay someone to stuff around for days trying to out optimise (most optimisations will tend to be through algorithmic / process changes), not to mention dealing with the inevitable quirks/pains when someone tries to modify it.

  15. Submitter is clueless - 99.9% of web sites run on by raymorris · · Score: 5, Insightful

    Quoting TFS, "t is not a language that you think of while writing programs for popular fields such as mobile apps or websites". Submitter clearly doesn't have much idea how web sites work. For web sites, your browser (a C or C++ program) sends a request through routers running Cisco iOS (a C program) to a web server such as Apache (a C program), which may run a module such as mod_php (a C program) which in turn probably runs a library such as ImageMagick (a C program) which generates the content. The content is fed back through the web server (still C) to your browser. For larger sites, there is often a proxy in the middle, such as Squid (written in C) or mod_proxy (more C).

  16. actually a good metric by aepervius · · Score: 4, Insightful

    A language is thriving or dying by the number of inexperienced developper trying to learn it. If no inexperienced cev learn it... it is dying. See the experienced dev of today were the noob of yesterday. If everybody is learning c# or java it is a pretty good indication of what the future of c, c++ will be. For reference see cobol. But rejoice , a dying or less used language means that for us the kldr gen, assured contracts works.

    --
    C. Sagan : A demon haunted world:
    http://www.amazon.com/gp/product/0345409469/
    visit randi.org
  17. Bah... C is still king baby by Proudrooster · · Score: 2

    C is not dying. Most of the libraries that are used behind the scenes to support Swift, Objective-C, Java, Python, Perl, LINUX, C#, and New Embedded Platforms like PI, are all written in C/C++.

    C scales as well as any other language as long as you use C++ and objectify everything so it can fire it up in containers. You can't use global variables anymore and everything needs to be encapsulated into an object. It pains me to do this, but with the shift to the cloud there is no choice (please prove me wrong).

    C is the bed-rock of all that is digital. If anything needs to die it is Java. The new owner of Java doesn't seem to be taking care of it like Sun Microsystems used to. Yeah, I am looking at your Oracle.

    Consider how many C libraries this Slashdot page passed through just to get to your eyeballs.

  18. Inevitable decline in popularity... by Harold+Halloway · · Score: 2

    ...since D was released.

  19. C is only dying in the buzz department by JoeyRox · · Score: 3, Insightful

    C is not the next great thing. But is still the one of the best things and will always be a workhorse.

  20. Re:We're all programming in Machine Code by JoeMerchant · · Score: 2

    This statistic might just mirror my thinking on the "popularity" of C. Are we talking market share, or number of users?

    I'd guess that the number of users is remaining constant, or slowly growing. The market for users of programming languages continues to expand rather quickly, so it's entirely possible that C's market share declines while its number of users continues to grow.

    Then you have the college grad resume effect: every language they ever wrote two lines of code in ends up on the resume... what does lines of code mean, anyway? Can we have a metric for number of hours that end-users execute code that was written in each language, coupled with another metric for number of hours that people spend writing and maintaining that code? Is there any way to untangle that from the number of hours spent in requirements gathering sessions and showing prototypes to people who don't know what they want? I don't think so.

  21. Re:Delphi #11's written in Object Pascal by JoeMerchant · · Score: 5, Funny

    Calling out MSVC as the reference C compiler for execution speed is like calling out a parade float as the performance reference for internal combustion powered vehicles.

  22. C is slowly being replaced by C++ by cpghost · · Score: 4, Insightful

    C isn't dying, but I think that it is being slowly replaced more and more by C++. Not all of a sudden, but when new code gets added, it is just more convenient to use std::string, RAII, the whole C++ Standard Library. Especially since C++11, C++ and its library have matured a lot to actually become useful and have you write beautiful and fast/efficient code, thanks to move semantics. So no, C isn't dying, it is morphing into C++11 and later. Even for embedded and kernel-level programming: check out recent projects: many use C++, carefully avoiding features like virtual functions that would slow down running time. It is as good as C can get, only better.

    --
    cpghost at Cordula's Web.
    1. Re:C is slowly being replaced by C++ by Dutch+Gun · · Score: 3, Insightful

      The real problem with C++ is not slowness, but being too complex and unpredictable. I think that what will happen is that C will get the few good features from C++, and the rest will die.

      You're correct that C++ is typically no slower than C, but it seems very unlikely to disappear anytime soon. There are probably billions of lines of C++ out in the real world. It will never be the most popular language, but it's a very significant one, and will be for quite some time. C++ is used when you need the performance of a to-the-metal compiled language like C, but need better abstraction models for large, complex systems. But unlike some other languages, you typically pay little to nothing extra for these abstractions, as the burden is shifted to the compiler. There are many times when performance really does matter, and you can't simply afford to throw more hardware at a problem, such as a very complex application on a single client PC, a videogame console, or at massive scales like in mega data centers.

      If you think C++ is "unpredictable" then you just don't know the language all that well. I'm not trying to sound arrogant or condescending, as it's absolutely a difficult language to learn and especially difficult to master (hell, probably near impossible to master it *all*), but "unpredictable" is how you describe managed memory, not C++. Yes, C++ has a lot of sharp edges as a language. It's ugly, clunky, bloated (aka "feature-rich"), slow to compile, and difficult to master. But it also has a large, mature ecosystem (thanks to its C-based heritage), and damn near every significant CPU or platform has a C++ compiler that supports it, probably topped only by C.

      So really, it's reasonably safe to say that neither C nor C++ are going anywhere anytime soon, thanks partially due to sheer inertia caused their pervasiveness through our critical infrastructure. This fact alone dictates that compiler support will remain a priority among major software companies (Microsoft, Intel, Apple) or projects (Clang, CGG). Add to that the enormous codebases that companies have invested in with both languages, and C/C++'s longevity is even more likely.

      --
      Irony: Agile development has too much intertia to be abandoned now.
  23. Re:We're all programming in Machine Code by hey! · · Score: 5, Informative

    C was conceived as a portable shorthand for assembly language. It has evolved into its own beast over the decades - especially when you include C++.

    It makes no sense to include C++, just because C++ shares certain elements with C. The design philosophy is completely different. C is a minimalist language. It has acquired more features over the years, like unicode support, but based on demonstrable need. C++ is more prescriptive in its philosophy: these are the features you should be using if you want to be doing object oriented programming.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  24. Re: We're all programming in Machine Code by Anonymous Coward · · Score: 5, Insightful

    It's worse than that. Since they base this on Internet searches, which is a metric only an idiot could think is good, you end up in a situation where dumbed down languages used by dumbed down people who are too stupid to even use those without handholding pump up search volume for those very same languages.

  25. Re:We're all programming in Machine Code by hey! · · Score: 4, Informative

    I'm well aware of this, but it doesn't change the fact that C++ is a different language with a fundamentally different philosophy. Adding features to a language is not some kind of neutral operation; it can affect users that have no intention of using those features.

    Were it not for operation overloading the argument that C++ is simply C with classes would be a lot stronger. Then if you came across the expression "a + b", you would know it means exactly what "a + b" means in C: either integer addition, floating point addition, possibly with an implicit typecast on one of the operands. In C++ the "+" might be something else altogether; it might even have side effects.

    This is neither good nor bad, but it's unquestionably different.

    Oh, and by the way, moderators: troll? Really?

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  26. Re:We're all programming in Machine Code by hey! · · Score: 2

    I see it as a mixed bag. If you are extending the addition operation to non-built-in types like matrices or complex numbers it's a good thing, although you can obviously screw it up. If you're implementing some kind of Abelian group or algebraic ring it's a good thing. Even if you're just using operator overloading in some way that makes intuitive sense, like string concatenation ("a" + "b" == "ab") or repetition ("a" * 3 == "aaa") or comparison ("a" "b" == true), I see it as a good thing.

    But operator overloading obviously gives a great deal of scope for sloppiness and obscurity.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  27. Re:We're all programming in Machine Code by serviscope_minor · · Score: 3, Insightful

    I beg to differ: it IS bad. Because when you read a+b, you have NO idea what may be happening

    I beg to differ with you!

    If you see the function add(a, b), you have NO idea what may be happening. And this applies to ALL the functions. In C++ a+b simply means operator+(a,b) IOW it's a function with a funny syntax just like any other.

    And the effect of the overloading can be completely different for various types.

    Well of course, adding two floating point numbers is a very different operation to adding two integers. Totally different instructions. The former can even generate a floating point exception and crash your code if you've set the exception flags. And then there's adding two signed inegers. You can always safely add unsigned types. If you add signed ones, overflow invokes nasal demons.

    --
    SJW n. One who posts facts.