Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming Perl Python Ruby

C/C++ Back On Top of the Programming Heap? 611

Drethon writes "On this day in 2008, a submission was posted that C/C++ was losing ground so I decided to check out its current state. It seems that C has returned to the top while Java has dropped by the same amount, VB and PHP have dropped drastically, C++ is holding fast but now in third place and Objective-C and C# have climbed quite a bit. 2008 data thanks to SatanicPuppy: 1. Java (20.5%); 2. C (.14.7%); 3. VB (11.6%); 4. PHP (10.3%); 5. C++ (9.9%); 6. Perl (5.9%); 7. Python (4.5%); 8. C# (.3.8%); 9. Ruby(2.9%); 10. Delphi (2.7%). The other 10 in the top 20 are: JavaScript, D, PL/SQL, SAS, Pascal, Lisp/Scheme, FoxPro/xBase, COBOL, Ada, and ColdFusion."
This discussion has been archived. No new comments can be posted.

C/C++ Back On Top of the Programming Heap?

Comments Filter:
  • I would expect that a lot of companies are probably working on importing their legacy systems to work for the new 64 bit systems.
    Now that most PC's are out with more then 4 gigs of RAM. Many OS's are going towards 64 bit OS's and a lot of those old 32 bit systems programmed in C for performance, needs to be upgraded.
    A lot of those programs that seemed to run fine in windows 3.1 are finally stop working in windows 7 64 bit.

    I am not saying C coding is just for legacy systems, but a good amount of legacy syste

    • Re:64 bit porting? (Score:4, Interesting)

      by vlm ( 69642 ) on Tuesday April 24, 2012 @09:43AM (#39781761)

      I would expect that a lot of companies are probably working on importing their legacy systems to work for the new 64 bit systems.

      a good amount of legacy systems are written in C, and most of those C written programs are fairly optimized for their platform they were designed to run, and we are starting to switch to 64 bit and multi-core architecture.

      You're more or less paraphrasing an email I recall from Linus back in '94 when the 64 bit Digital Alpha port was just beginning. Of course that's 18 years ago not anything new. I think we still have many more years of the "64 bits is new" meme left. With more GOOG effort I could probably find that email. Or it might have been an old Linux Journal article about the alpha port rather than an email. Hmm.

      I was pretty late to the conversion to 64 bits compared to most people in the biz. I don't think the debian amd64 port was released until 2007 ish, I think as part of Debian 4.0/etch, although I was using the amd64 port as "testing" (before it became "etch") for at least a year or two earlier.

      Some of our amd64 hardware at work is considered legacy now, just because its so old.

      I remember in the early years of the 32/64 bit conversion, like half a decade ago, running legacy non-free software like the 32 bit flash player on a 64 bit OS was a pretty interesting problem, but it was all solved a long time ago, so its not interesting anymore. I would imagine someday in the future the windows folks will have similar interesting experiences when they catch up to linux, as they always eventually do.

  • by wpi97 ( 901954 ) on Tuesday April 24, 2012 @09:18AM (#39781433)
    C and C++ are two separate and very different languages.
    • Not that different.
      For the most part if you write C code in C++ the code works fine.

      • by wpi97 ( 901954 ) on Tuesday April 24, 2012 @09:24AM (#39781505)
        Yes, for the most part... Except when you write in C++ as though it is C, you get really bad C++ code. C++ has a different philosophy and a very different set of idioms.
        Remember, a good Fortran programmer can write good Fortran code in any language. But that doesn't mean that every language is like Fortran.
        • by UnknownSoldier ( 67820 ) on Tuesday April 24, 2012 @09:47AM (#39781801)

          > except when you write in C++ as though it is C, you get really bad C++

          Total nonsense. Almost every game these days is written in C++ and while they all vary in the amount of applied OOP and generic meta programming, the fastest ones use a data driven approach because OOP is SLOW - raw C++ makes dealing with ONE type of object easy, but it doesn't help dealing with performance issues when you have MANY objects. I.e. Template Bloat, lack of virtual dead stripping, and inflated deep hierarchies, to start with.

          C is a good language because it forces one to think about runtime performance. When you have some junior coder sticking a virtual function call inside a for loop because he doesn't the three levels of pointers being applied the problem is not the language per say, but programmers who don't understand enough of the hardware to know "There Is No Such Thing As A Free Lunch"

          Higher level languages tend to help minimize *developer* time, at the expense of run-time.

          • by Black Parrot ( 19622 ) on Tuesday April 24, 2012 @10:13AM (#39782151)

            Higher level languages tend to help minimize *developer* time, at the expense of run-time.

            If you're really interested in run time, you should be more concerned with asymptotic ("big-O") performance rather than basic code efficiency.

            Also, no amount of speed-up makes up for code that is wrong. The proper reason for choosing a higher-level language is that its readability contributes to correctness.

          • Almost all Windows AAA games are written in C++.
            Fixed that for you.
            First, they're mostly written in C++ because you don't prematurely optimize. Its the root of all evil, as Knuth said. Then, you go back, and you find your extremely critical sections, your bottlenecks, and THOSE you write specific libraries in C to optimize. But even then, lots of your work is going to be done by existing windows or directx libraries. Those DirectX libraries are written in C, sure, as are drivers... but that amounts to
          • by s73v3r ( 963317 )

            Writing modern C++ doesn't mean you have to use OOP. You don't. You can do data driven quite easily.

            However, modern C++ means to take advantage of modern constructs, like smart pointers, and modern containers, instead of using unsafe and non-bounds checked arrays.

        • by robthebloke ( 1308483 ) on Tuesday April 24, 2012 @09:58AM (#39781937)

          Except when you write in C++ as though it is C, you get really bad C++ code.

          When you write C++ as though it were C++, you get really bad, terribly inefficient code. If you need to extract maximum performance from your code, a C-with-classes approach to SIMD & multi-core optimisations tends to lead to better results imho. It's very difficult to adhere to what most people refer to 'good C++', because 'good C++' implies nicely encapsulated objects. This doesn't really work so well when you have 256bit wide SIMD registers. Suddenly you find your C++ classes are actually maintaining the state of 8+ objects, and then some of the idioms start unravelling. OOP is currently being stabbed to death by concurrency & parallelism, and there is nothing anyone can do to save it.

          • by kraut ( 2788 )

            Except when you write in C++ as though it is C, you get really bad C++ code.

            When you write C++ as though it were C++, you get really bad, terribly inefficient code. If you need to extract maximum performance from your code, a C-with-classes approach to SIMD & multi-core optimisations tends to lead to better results imho. It's very difficult to adhere to what most people refer to 'good C++', because 'good C++' implies nicely encapsulated objects. This doesn't really work so well when you have 256bit wide SIMD registers. Suddenly you find your C++ classes are actually maintaining the state of 8+ objects, and then some of the idioms start unravelling. OOP is currently being stabbed to death by concurrency & parallelism, and there is nothing anyone can do to save it.

            Surely it can be beyond your wit to write array classes to apply SIMD operations efficiently and cleanly on arrays of numbers?

          • by s73v3r ( 963317 ) <s73v3r AT gmail DOT com> on Tuesday April 24, 2012 @12:46PM (#39784593)

            When you write C++ as though it were C++, you get really bad, terribly inefficient code.

            [Citation Needed]

    • I think people need to learn that all languages just create a bunch of machine language and is mostly just statements, loops and branches so there isn't a great amount of difference between any language. Anything you can make in Java or C# (are these truly high level these days or more of a medium level?) I can do in C. The only difference is I have to implement how these features are done in C (or find a library) rather than using language features. Not saying its better, just saying it is all ultimatel
    • by Artraze ( 600366 )

      With C++ basically being a superset of C, I wouldn't say that's entirely true.

      Regardless, though, when you look at the wide world of programming languages, they are _far_ more distinct from everything else than they are from each other. Java, C#, Python, Ruby, JS, HTML(?!) I can't think of a single mainstream language aside from "C/C++" that uses pointers lacks a garbage collector. So in regard to practical application and required skills, they are effectively quite similar.

  • My two favorite languages aren't dying!

    Whatever anyone else thinks, I think they're not only extremely solid languages that have stood the test of time, but they're both really fun to program in. I know it's at least somewhat subjective, and right tool for the job and all, but that doesn't mean you can't have preferences and it's good to see the "Yankees" of programming not headed into obscurity.

    • by goombah99 ( 560566 ) on Tuesday April 24, 2012 @09:21AM (#39781463)

      My two favorite languages aren't dying!

      Yes, Perl and Ruby combined have twice the share of python. It's really more like 20 times, since you can get ten times as much done in a single line of perl.

    • by Hentes ( 2461350 )

      Programming is fun when it poses a challenge. So while I agree that C++ coding is fun, it's inefficient for a lot of purposes.

    • Re: (Score:3, Interesting)

      by Desler ( 1608317 )

      They were never dying. C and C++ underpin all OSes, the Internet, pretty much the multimedia apps you use, the vast majority of games/game engines, etc. and they are the implementation languages of all the 'hip' fad languages.

      • And you forgot scientific programs as well. In our collaboration most of the Monte Carlo simulators were written in FORTRAN, which is not bad, but the problem is finding someone who knows FORTRAN to maintain them. And only recently we have moved to C ( last couple of years). However I noticed that most scientists below the age of 35 use C. Python is used, but only for scripting purpouses ( as it should ). Ps, my domain is astrophysics/astroparticles.
  • by TaoPhoenix ( 980487 ) <TaoPhoenix@yahoo.com> on Tuesday April 24, 2012 @09:18AM (#39781437) Journal

    Will Java drop even further because of the whole Oracle mess?

      I guess I am surprised that Python is ahead of C#, and that Ruby is so low given its underground buzz.

    • by plopez ( 54068 )

      If Ruby wasn't such a niche language (at least at this point in time) it wouldn't be an underground language, now would it? Underground means outside of the mainstream which Ruby is for the most part.

    • by Theophany ( 2519296 ) on Tuesday April 24, 2012 @09:24AM (#39781501)
      Probably has something to do with it's buzz being 'underground' and its benefits being widely refuted?
    • Python was ahead of C# , what's listed in the summary is the 2008 index, the 2012 index has C# about three and a half points ahead of python.

      Ruby is a hype machine, you can tell by the huge spikes and valleys when you see its popularity graphed out individually over the years. It's seemed to have relegated itself now to about a point and a half now.

      http://www.tiobe.com/index.php/paperinfo/tpci/Ruby.html [tiobe.com]

    • by cjcela ( 1539859 ) on Tuesday April 24, 2012 @09:33AM (#39781639)
      My impression is that Java will eventually relegated purely to in-house software, for large companies that are heavily invested in Oracle. Most of the goodness of Java comes from the Java API's, and these are on a legal battle. Most OS's are already not including the platform by default. At the end, for independent software companies, and specially for small shops, it feels too risky to invest one's time in learning or keeping up with a language that is controlled by a suing-happy company. As much as I despise Microsoft's ways of polluting languages (remember J++?), I think they are orders of magnitude more trustworthy than Oracle.
  • by TheNinjaroach ( 878876 ) on Tuesday April 24, 2012 @09:22AM (#39781475)
    That's interesting to me that PHP is more popular than a language like C#. But I guess when you include VB and all of its legacy, then the whole ".NET" stack is quite a bit more popular.
  • Opinion (Score:4, Interesting)

    by degeneratemonkey ( 1405019 ) on Tuesday April 24, 2012 @09:23AM (#39781481)
    Of this list, C#, Ruby, and Python are clearly the best languages as far as I'm concerned.

    The C++ longevity is expected. Every engineer worth his weight in salt should be able to write C++ code. (get off my lawn etc.)

    I am curious abobut where the C growth is coming from. Embedded stuff? Native libraries for the increasing volume other higher level languages? ;)
    • Re:Opinion (Score:4, Interesting)

      by Raenex ( 947668 ) on Tuesday April 24, 2012 @01:26PM (#39785241)

      Every engineer worth his weight in salt

      You're mixing up the phrase "worth its weight in gold" with "worth his salt".

  • Popularity Contest (Score:2, Insightful)

    by Anonymous Coward

    The Tiobe index is a popularity contest - a pageant for programming languages - so, you get the trend on what's hot, but that is just part of the IT business.

    I challenge you to find 5 banks whose core are not built with Cobol, for example.

    My point is that real use != trending languages

  • The trend after the web became big in the mid-90s was to find specialized languages and try to code in those.

    The trend has swung backward. People are now looking for general purpose languages. They want Swiss army knives, not specialized tools.

  • by godrik ( 1287354 ) on Tuesday April 24, 2012 @09:27AM (#39781553)

    The 20th language is NXT-G. What the fuck is that? Is it really lego's programming language for robots as wikipedia indicates (http://en.wikipedia.org/wiki/NXT-G) ? And that is more popular than bash or matlab?

  • by Relayman ( 1068986 ) on Tuesday April 24, 2012 @09:29AM (#39781571)
    From the article: "Observe that the TIOBE index is not about the best programming language or the language in which most lines of code have been written." [Emphasis added]

    It's a survey, no more, no less. Using it to make decisions about your career is foolhardy at best.
  • I thought they were counting actual use, and not vague childhood memories?
  • by Anonymous Coward on Tuesday April 24, 2012 @09:33AM (#39781637)

    It's unbelievable that people still pay any attention whatsoever to it. Some company comes up with a ridiculous 'methodology' to gauge the popularity of languages, and people assume that it's actually related in any way to reality.

    Further reading:

    The best place to start is at TIOBE's own methodology description page: http://bit.ly/h3ftBa
    No need to go much beyond that, to figure out that it's a meaningless index. To save you the reading, it more or less boils down to this:

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

    +" programming"
    ---

    That's all.

    Still need some more convincing:

    Why TIOBE isn't all that useful (mild): http://bit.ly/IeG0yA
    The TIOBE index is being gamed: http://bit.ly/IeGnt1

    It's no short of ridiculous. Time to stop paying attention to it, move along!

  • by doconnor ( 134648 ) on Tuesday April 24, 2012 @09:34AM (#39781649) Homepage

    What compiler are Pascal developers using that isn't Delphi. Aren't most Pascal compilers capable of handling Delphi's Object Pascal anyway?

    Shouldn't the Pascal and Delphi be combined into one grouping the way that all the different C++ are combined?

  • by Twinbee ( 767046 ) on Tuesday April 24, 2012 @09:36AM (#39781661)
    A shout goes out to this site [hammerprinciple.com] which actually does a pretty good job of comparing all the languages on 'subjective' attributes such as "I find it easy to write efficient code in this language" (C being top here), or "Code written in this language tends to be verbose" (Cobol and Assembler are worst here, but Java is 3rd place, and that's bad considering it's meant to be a modern higher level language).

    You can even click each language and see what comment it is best for. For example, Haskell is top for "This language has a strong static type system" and "When I write code in this language I can be very sure it is correct". Meanwhile, something like PHP is top for "I am sometimes embarrassed to admit to my peers that I know this language" and "This language has many features which feel "tacked on"".
  • by ctrl-alt-canc ( 977108 ) on Tuesday April 24, 2012 @09:36AM (#39781669)
    Java floating point management is flawed by design. Using java for controlling anything serious opens up a Pandora box: just look at this [berkeley.edu] (and look here [berkeley.edu] if you don't know dr. Kahan)
  • Strange, Classic ASP doesn't seem to be on the list anywhere. Some people where I work seem to think that our "enterprise" processing system is just fine written in Classic ASP. Well, at least they migrated most of the Access crap to Classic ASP. Baby steps.
  • by Anonymous Coward on Tuesday April 24, 2012 @09:44AM (#39781767)

    Home Depot has reported that the hammer has moved up 2 places in the rankings overtaking the Phillips head screwdriver and pliers as the most widely used hand tool. Also moving up in the ranks were the flashlight and the crescent wrench, precipitating the further decline of the Allen wrench and the drill bit in the rankings.

    Haha, who still uses the Allen wrench? Clearly the Phillips head screwdriver is superior. Newbs.

    • by vlm ( 69642 ) on Tuesday April 24, 2012 @10:06AM (#39782039)

      Hammer - Obviously perl. Technically, you can do absolutely anything with it, but sometimes the results will look like hell. Swiss-Army Chainsaw makes a good second tool choice for perl.

      Phillips screwdriver - Obviously Ruby. The mythology is both came from Japan, although phillips doesn't sound very Japanese, in ye olden days stuff made in America had slot screws and stuff made in Japan had philips screws, so obviously phillips came from Japan. Also more ruby is probably being written outside Japan than within, now a days, but I still hear people claim Ruby is japanese.

      Just fill out a physical plant request form in triplicate and get your boss/mom to sign and your bosses boss to notarize - Obviously the hyperverbose business languages like cobol and java where hello world takes 3 pages and an hour of explanation.

      Plumbers helper / plunger - Obvious GDB reference

      Table saw - Obvious assembly language reference. Works great and fast, until you cut your hand off and it makes a mess of the project.

      Having trouble finding analogies for the rototiller and the roofing nailgun. Please advise...

  • by j. andrew rogers ( 774820 ) on Tuesday April 24, 2012 @10:12AM (#39782135)

    There is definitely movement away from Java and toward C/C++ for some types of software. Applications bottlenecked by memory performance, like databases and high-performance codes, will often be faster than a language like Java by integer factors. When people assert that Java is about as fast as C/C++ they are talking about code like tight, CPU-bound loops. However, Java is wasteful of memory and CPU cache lines in a way that C/C++ is not under normal circumstances which has a significant adverse impact on the performance of some codes.

    On recent processors, memory performance is a bigger bottleneck than CPU performance for performance-sensitive codes. The throughput of CPUs has grown faster than our ability to keep those CPUs fed from memory. In the supercomputing world this started to become evident years ago; memory benchmarks like STREAM became more closely correlated with real-world performance than CPU benchmarks like LINPACK for a great many algorithms. The resurgence of C/C++ is partly driven by this reality since it makes memory optimization relatively straightforward and you can receive large gains relative to Java for modest effort.

    A smaller but also important driver away from Java is the GC. The increasing focus on "real-time" and predictable latency for applications like analytics and database engines is complicated when Java's garbage collector is inserted in the middle. This is a chronic point of pain for some applications.

    I developed Java for years but my latest project (a real-time analytical database engine) is being written in C++ for the above reasons, among others. Writing high-performance applications of this type is actually pretty painful in Java because you end up doing unnatural things in the language to even approach the efficiency of conventional C++. Anecdotally, many of our C++ developers were doing Java until recently so the statistic does not surprise me.

  • Ah, TIOBE again. (Score:4, Insightful)

    by Millennium ( 2451 ) on Tuesday April 24, 2012 @11:52AM (#39783727)

    TIOBE makes for an interesting toy measure. But for truly reliable conclusions, particularly those related to the health of our favorite technologies, we must instead ask: does NetCraft confirm it?

  • by Bill_the_Engineer ( 772575 ) on Tuesday April 24, 2012 @12:15PM (#39784061)

    Actually 'C' is the "top dog" whereas 'C++' is #3 behind Java.

    C recently had its standard updated and the uptick could be a reflection of this. Not to mention the increased exposure that C is getting from objective-C.

  • by sapgau ( 413511 ) on Tuesday April 24, 2012 @12:53PM (#39784701) Journal

    What no Groovy? Oh well, I should follow the masses mindlessly without considering the right tool for the job.

  • by Dcnjoe60 ( 682885 ) on Tuesday April 24, 2012 @01:23PM (#39785193)

    Without automatic cleanup, it was only a matter of time before C/C++ rose to the top of the heap.

We are each entitled to our own opinion, but no one is entitled to his own facts. -- Patrick Moynihan

Working...