Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?
Programming Stats News

C Beats Java As Number One Language According To TIOBE Index 535

mikejuk writes "Every January it is traditional to compare the state of the languages as indicated by the TIOBE index. So what's up and what's down this year? There have been headlines that C# is the language of the year, but this is based on a new language index. What the TIOBE index shows is that Java is no longer number one as it has been beaten by C — yes C not C++ or even Objective C."
This discussion has been archived. No new comments can be posted.

C Beats Java As Number One Language According To TIOBE Index

Comments Filter:
  • Re:...Bash? (Score:5, Insightful)

    by Tridus ( 79566 ) on Monday January 07, 2013 @03:11PM (#42508043) Homepage

    More like something is wrong with the measuring system being used.

  • Re:C? (Score:5, Insightful)

    by Rockoon ( 1252108 ) on Monday January 07, 2013 @03:12PM (#42508055)
    ...libraries for all those managed languages and platforms.
  • Re:C? (Score:5, Insightful)

    by AwesomeMcgee ( 2437070 ) on Monday January 07, 2013 @03:14PM (#42508081)
    Specifically the platforms. The boom in mobile devices all having varied hardware requires C glue for each one to let the managed stuff run. The mobile boom has ironically been a new hardware boom causing an old software boom.
  • Re:C? (Score:5, Insightful)

    by Old97 ( 1341297 ) on Monday January 07, 2013 @03:22PM (#42508223)
    'C' is the lowest common denominator. With 'C' I can write code for anything and everything. Mainframes, embedded devices, mobile, etc. Objective-C just extends C so it is more "pure" than C++ which introduces additional notations with different semantics and implementations such as memory allocation. So I can code for iPhone mostly in 'C'. I can write 'C' libraries and link them in on applications for iOS, Android, mainframe COBOL, Mac OS/X, any *ix operating system, Windows (including .NET), etc. It's the one language that is highly performant, ubiquitous and interoperable with every platform and language I can think of. Its almost always available for free.
  • Re:Dying gasps (Score:5, Insightful)

    by Hentes ( 2461350 ) on Monday January 07, 2013 @03:22PM (#42508225)

    Not really. While I agree that C is a bad language, it has no competition in low-level coding. With embedded systems gaining ground, more and more people will start to use it. Although C++ could take its role and it even fixes many of its shortcomings (e.g. namespaces), it's very easy to misuse, so most project leaders don't trust their collegues with it. What would people switch to? Forth, Pascal?

  • Re:Dying gasps (Score:5, Insightful)

    by localman57 ( 1340533 ) on Monday January 07, 2013 @03:30PM (#42508333)
    Exactly. When you are working in a resource constrained environment, and you want to be able to accurately predict what machine instructions will be generated from your source code, you use C. It's faster to code, and more portable than assembly language, with almost all of the control. Typically maybe 5% or less of your application needs to be really, really fast (interrupt handlers, DSP code, special communications or math or encryption libraries). You might code these in assembly, and the rest in C.

    But if you're starting new big applications for the PC in C, you're probably insane.
  • Re:Dying gasps (Score:2, Insightful)

    by Anonymous Coward on Monday January 07, 2013 @03:36PM (#42508433)

    If you think the failures are due to the language being selected, you're the problem, not C#.

  • TIOBE algorithms (Score:5, Insightful)

    by sl4shd0rk ( 755837 ) on Monday January 07, 2013 @03:41PM (#42508491)

    Clearly C is more popular as more people complain about it sucking.

    C sucks -- About 321,000,000 results
    bash sucks -- About 7,500,000 results
    Java sucks -- About 5,810,000 results
    c++ sucks -- About 898,000 results
    objective c sucks -- About 293,000 results

  • C Just works (Score:5, Insightful)

    by EmperorOfCanada ( 1332175 ) on Monday January 07, 2013 @03:42PM (#42508497)
    The bulk of my recent programming has been in Objective C but once I leave API calls my code quickly becomes pretty classic C with elements of C++. Yes I love the simplicity of a foreach type structure where it is brain dead to iterate through some set/hash/array of objects with little or no thought about bounds but once I start to really hammer the data hard I often find my code "degenerating" into c. Instead of a class I will create a structure. Instead of vectors I use arrays. I find the debugging far simpler and the attitude to what can be done changes. In fairly raw C I start having thoughts like: I'll mathematically process 500,000 structures every time someone moves their mouse and then I literally giggle when it not only works but works smoothly. What you largely have in C is if the machine is theoretically able to do it then you can program it. Good mathematics can often optimize things significantly but sometimes you just have brute manipulations that need to be fast.

    But on a whole other level my claim with most higher level languages ranging from PHP to .net to Java is that they often make the first 90% of a large project go so very quickly. You seem to jump from prototype to 90% in a flash; but then you hit some roadblocks. The garbage collection is kicking in during animations causing stuttering and the library you are using won't let you entirely stop garbage collection. Or memory isn't being freed quickly enough resulting in the requirement that all the users' machines be upgraded to 16Gb. Then that remaining 10% ends up taking twice as long as the first 90%. Whereas I find with C (or C++) you start slow and end slow but the first 90% actually takes 90% of the final time.

    But where C is a project killer is the whole weakest link in the chain thing. If you have a large project with many programmers as is typically found in a large business system working on many different modules that basically work on the same data set that a safer language like Java is far far better. I am pretty sure that if the business programmers working on projects that I have seen were to have used C instead of Java that those server systems would crash more than once a minute. You can still program pretty badly in Java but a decent programmer shouldn't blow the system apart. Whereas a decent C programmer might not be good enough for a large project.

    So the story is not if C is better than say Java but what is the best language for any given problem set. I find broad systems, like those found in the typical business, with many programmers of various skill levels are idea for Java. But for deep system where you layer more and more difficulty on a single problem such as real-time robotic vision that C or C++ are far superior. A simple way to figure out what is the best language is to not compare strengths and weaknesses generally but how they apply to the problem at hand. In a large business system where horsepower is plentiful then garbage collection is good and pointers are only going to be a liability. But if you are pushing up to the limits of what the machine can do such as a game then a crazy pointer dance might be the only possible solution and thus demand C or even ASM.

    Lastly do you want your OS programmed in Java?
  • Re:C? (Score:2, Insightful)

    by Pinhedd ( 1661735 ) on Monday January 07, 2013 @03:49PM (#42508605)

    Those aren't clear advantages. Rather, they're a shortcut toward writing shitty code.

  • Re:C? (Score:4, Insightful)

    by jjohnson ( 62583 ) on Monday January 07, 2013 @03:52PM (#42508639) Homepage

    The name of the fallacy you just demonstrated is "No True Scotsman".

  • Experiment (Score:2, Insightful)

    by Anonymous Coward on Monday January 07, 2013 @04:04PM (#42508827)

    Write "Hello World" or any other program you desire in C and in C++.

    Now look at the executable size.

    Run it through a profiler and see execution time.

    Now ask yourself, which language would you want to use on a system that has very limited resources without breaking out the assembler?

  • by kbdd ( 823155 ) on Monday January 07, 2013 @05:05PM (#42509883) Homepage
    I find it funny that people are claiming that C is a bad language, yet they use no such words to qualify assembly.

    C is a bad language to the extent that it lets do what you want, even if that means shooting yourself in the foot. A language that would marry C's strengths while providing safeguards against buffer overruns and other ills would be an oxymoron.

    If you have a section of code that is particularly time critical, you could write it in assembly as many people do. I prefer to actually write it in C but check the assembly output from the compiler, and optimize the C source until I am happy with the result. In all cases I have been able to achieve my objectives this way without actually having to insert a block of assembly (not all compilers let you do that in-line). The resulting code is still very easy to read (for me down the road or anyone else) while being efficient.

    C is not the Swiss army knife of software (even though if one language qualified, C would be the closest), but it has its areas of expertise. In the world of small embedded systems, there is simply no alternative worth considering (and few alternatives available.)

    For desktop applications, not so great (and I speak of experience.)

  • Re:Dying gasps (Score:5, Insightful)

    by Bill_the_Engineer ( 772575 ) on Monday January 07, 2013 @05:06PM (#42509907)

    While I agree that C is a bad language...

    Just because the language doesn't hold your hand and make sure you don't mess up doesn't necessarily make it a "bad" language. C++ could never fully take C's role due to the name mangling that C++ requires. I use and like C++ but there are somethings that are best left to C. Especially if you're binding compiled code to some interpreted language (e.g. Perl, Python, or Ruby) to speed up some computationally intensive portion of an application.

  • by Anonymous Coward on Monday January 07, 2013 @05:09PM (#42509967)

    You keep using the word 'statistics', I don't think you know what it means.

    Statistics excels in exactly this situation, when you don't have perfect data, but do have enough data to produce a flawed but useful analysis.

    YANAS, IADAS (You are NOT a statistician, I AM definitely a statistician)

  • Re:...Bash? (Score:2, Insightful)

    by s.petry ( 762400 ) on Monday January 07, 2013 @05:17PM (#42510127)

    Yep, they use frequency of search on the internet for the language to estimate. Which means confusing, and easily broken languages like C, and infrequently used(and thus easily forgotten) languages like bash get a huge leg-up.

    I think C is less confusing than Java, so to each their own. At work, we do tons and tons of scripting. I can't agree with your sentiment that it's only infrequently used languages. Maybe _you_ don't use them frequently, but many others do.

    With that said, I do agree with your statement that their method for determining who is using what language is broken.

  • Re:Woohoo (Score:3, Insightful)

    by Megane ( 129182 ) on Monday January 07, 2013 @05:33PM (#42510361) Homepage

    It's depressing that Objective-C, Ruby and VB.Net have gone up, and see C# go down...

    It's depressing to see a Microsoft-proprietary language, that they're not even supporting on one of their most recent platforms, go down in popularity? Really?

  • Re:Dying gasps (Score:3, Insightful)

    by steelfood ( 895457 ) on Monday January 07, 2013 @07:04PM (#42511703)

    Object-oriented is good for projects that need to be maintained. But it comes with additional complexity that programmers need to learn and track. It's only feasible for very large projects with multiple developers working on multiplel branches of development, and even then, it requires a very good maintainer, or it's too easy to fuck everything up. The infrastructure necessary to do good OO quickly gets as expensive and as complex as the problem the OO paradigm is trying to solve.

    Procedural is the simpliest. It's not the fanciest, but it works in most cases. It handles code reuse more than adequately, which is all that a programmer really is looking to minimize (less duplication means less typing). And it's quick.

    With Java now in Oracle's hands, it's not surprising C is making a comeback.

  • Re:Dying gasps (Score:4, Insightful)

    by RCL ( 891376 ) <> on Monday January 07, 2013 @07:34PM (#42512037) Homepage
    More importantly, OOP requires that you start with class hierarchy - wrong approach. Class hierarchy is de facto a decision tree, a very unstable classifier. If you build it on insufficient number of observations (which is nearly always the case when you start writing software from scratch), you will need to throw away your decision tree and rebuild it anew. That's what we call "refactoring" in OOP.

    Let me shout it loud: Premature classification is the root of all evil! :) Think about your program as of data-to-data mapping primarily, and then build the abstractions.

Any sufficiently advanced technology is indistinguishable from a rigged demo.