Slashdot Mirror


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

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."

611 comments

  1. Because of Windows by who_stole_my_kidneys · · Score: 0

    the whole OS is compiled in C++

    1. Re:Because of Windows by Anonymous Coward · · Score: 1

      Yeah and that 9.9% just includes vista ;)

    2. Re:Because of Windows by i+kan+reed · · Score: 2

      I'm not sure what you mean by "whole os". The entire kernel is basically C, but technically C++ like Microsoft likes. Substantial amounts of things that come on a windows disc these days are written in C#.

    3. Re:Because of Windows by Bengie · · Score: 2

      Windows is written in C with C++ wrappers to the APIs. All of the Win32 APIs may be accessed via C. There is a limited amount of .Net applications in Windows because most services/etc, must be able to function with a barebones install. I saw an interview with an MS devel who wanted to use C# for the interface to the Windows Media Player for Vista/Win7, but they were not allowed to use .Net as it cannot be assumed installed in all cases.

    4. Re:Because of Windows by rev0lt · · Score: 1

      Substantial amounts of things that come on a windows disc these days are written in C#.

      I'd say you didn't try a disk since Longhorn. Very few MS apps require .NET at all (yes, they don't eat their own dogfood), and you can certainly install a MS operating system without a vaguely modern .NET runtime.

    5. Re:Because of Windows by Richard_at_work · · Score: 3, Informative

      It depends what you are doing with it - in the server space, .Net is used all over the place (Dynamics CRM, SharePoint, SQL Server, Exchange - all have a dependency on .Net these days).

    6. Re:Because of Windows by hackula · · Score: 1

      I thought Windows Media Player WAS written in .Net (WPF specifically)? I could be wrong, but a couple years ago I remember it being the exception, along with VS 2010.

    7. Re:Because of Windows by rev0lt · · Score: 1

      Usually the dependency isn't related directly to the core product, but to the programming libraries and supporting tools. The new SQL Server seems to have a deeper dependency on .NET, but it's unlikely the core applications/services are running managed code (yeah, I'm too lazy to go check the binaries).

    8. Re:Because of Windows by Richard_at_work · · Score: 0

      It depends on the product - Dynamics CRM and SharePoint are almost entirely written in ASP.Net, while SQL Server and Exchange have supporting systems dependent on .Net (plus the end user tools).

  2. Eh? by ledow · · Score: 0

    How comes the summary list doesn't correlate at all with the list on the article?

    And you know your language is dead when it's less popular than Lisp.

    1. Re:Eh? by i+kan+reed · · Score: 4, Funny

      So is Lisp in some sort of state of perpetual undeath then?

    2. Re:Eh? by Anonymous Coward · · Score: 0

      The summary list is the 2008 data.

    3. Re:Eh? by Sponge+Bath · · Score: 1

      Summary contains 2008 data, article contains current data. C is awesome incarnate: lean, readable and full of low level goodness.

    4. Re:Eh? by ledow · · Score: 1

      Doh.

      My mistake. Can't read years properly.

      But still, how pointless to put the OLD data in the summary and the 4+ years more modern data in the article?

    5. Re:Eh? by PhilHibbs · · Score: 2

      Because the linked article is about the current state, the Slashdot article is about the comparison with 2008 and so includes the missing information that the linked article does not.

    6. Re:Eh? by MadKeithV · · Score: 1

      Summary contains 2008 data, article contains current data. C is awesome incarnate: lean, readable and full of low level goodness.

      Yeah, really!

    7. Re:Eh? by FrootLoops · · Score: 5, Informative

      The site was loading very slowly so I scraped the 2012 rankings for the curious but impatient:

      1 - C - 17.555%
      2 - Java - 17.026%
      3 - C++ - 8.896%
      4 - Objective-C - 8.236%
      5 - C# - 7.348%
      6 - PHP - 5.288%
      7 - (Visual) Basic - 4.962%
      8 - Python - 3.665%
      9 - JavaScript - 2.879%
      10 - Perl - 2.387%
      11 - Ruby - 1.510%
      12 - PL/SQL - 1.373%
      13 - Delphi/Object Pascal - 1.370%
      14 - Visual Basic .NET - 0.978%
      15 - Lisp - 0.951%
      16 - Pascal - 0.812%
      17 - Ada - 0.783%
      18 - Transact-SQL - 0.760%
      19 - Logo - 0.652%
      20 - NXT-G - 0.578%

    8. Re:Eh? by Anonymous Coward · · Score: 0

      So is Lisp in some sort of state of perpetual undeath then?

      (!(braaiiinnnsss))

    9. Re:Eh? by azalin · · Score: 3, Funny
      I would rather suggest it to be the gate to the underworld.

      “Through me you pass into the city of woe:
      Through me you pass into eternal pain:
      Through me among the people lost for aye.
      Justice the founder of my fabric moved:
      To rear me was the task of Power divine,
      Supremest Wisdom, and primeval Love.
      Before me things create were none, save things
      Eternal, and eternal I endure.
      Abandon all hope, ye who enter here.”

    10. Re:Eh? by Big+Hairy+Ian · · Score: 1

      So is Lisp in some sort of state of perpetual undeath then?

      You try speaking with dead lips :)

      --

      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.

    11. Re:Eh? by ZorinLynx · · Score: 1

      >19 - Logo - 0.652%

      People still use this? I remember this being a toy language for kids to learn how to program.

    12. Re:Eh? by phantomfive · · Score: 1

      I think that's what it's used for. My cousin recently took a course using Logo. She used it to write cursive letters, I was impressed.

      --
      "First they came for the slanderers and i said nothing."
    13. Re:Eh? by Black+Parrot · · Score: 1

      Interesting that the top one is only 30x more common than the 20th. I would have guessed 2-3 orders of magnitude.

      Looks like the distribution might follow a power law.

      --
      Sheesh, evil *and* a jerk. -- Jade
    14. Re:Eh? by Anonymous Coward · · Score: 0

      Logo is a nice pedagogical language, but there's far more to it than just pretty shapes drawn by turtles. Under the covers, it's mostly Lisp with an altered syntax that involves far fewer parentheses.

    15. Re:Eh? by Black+Parrot · · Score: 1

      >19 - Logo - 0.652%

      People still use this? I remember this being a toy language for kids to learn how to program.

      That's an odd use, since it's utterly unlike most programming languages. Basically a "program" is a knowledge base expressed as logical implications, and Logo is an inference engine runs on that data.

      --
      Sheesh, evil *and* a jerk. -- Jade
    16. Re:Eh? by Anonymous Coward · · Score: 0

      I think you're thinking of Prolog, not Logo. Logo is the one with turtle graphics, and is more a functional language.

    17. Re:Eh? by BasilBrush · · Score: 2

      The interesting one is Objective-C has nearly overtaken C++. It'll probably be passed in the next couple of months.

      In fact if the trend continues, Objective-C will be the most popular language in about 3 years.

      http://www.tiobe.com/content/paperinfo/tpci/images/tpci_trends.png

    18. Re:Eh? by Anonymous Coward · · Score: 0

      >19 - Logo - 0.652%

      People still use this? I remember this being a toy language for kids to learn how to program.

      That's an odd use, since it's utterly unlike most programming languages. Basically a "program" is a knowledge base expressed as logical implications, and Logo is an inference engine runs on that data.

      Are you sure you aren't confusing Logo with Prolog?

    19. Re:Eh? by Anonymous Coward · · Score: 0

      C is just like the English language. Well used gives you great literature and joy to those who readit . Poorly used make you weep for the future of humanity, like youtube comments.

    20. Re:Eh? by Anonymous Coward · · Score: 0

      C / Cish at 41% of total...

      Java / Javaish at 20%

    21. Re:Eh? by Anonymous Coward · · Score: 0

      ... it's utterly unlike most programming languages. Basically a "program" is a knowledge base expressed as logical implications, and Logo is an inference engine runs on that data.

      No... you're thinking of Prolog. Logo programs look like this:


      to circle
          repeat 360 [ fd 1 rt 1 ]
      end

    22. Re:Eh? by Anonymous Coward · · Score: 0

      >19 - Logo - 0.652%

      People still use this? I remember this being a toy language for kids to learn how to program.

      That's an odd use, since it's utterly unlike most programming languages. Basically a "program" is a knowledge base expressed as logical implications, and Logo is an inference engine runs on that data.

      That would be Prolog. Logo is a simple graphic-focused language, iirc.

    23. Re:Eh? by Barabul · · Score: 1

      Are you sure you are not talking about prolog?

    24. Re:Eh? by TheRaven64 · · Score: 1

      You may be confusing Prolog and Logo. Logo is an imperative language...

      --
      I am TheRaven on Soylent News
    25. Re:Eh? by Anonymous Coward · · Score: 0

      Logo is awesome in 3D: http://www.awolnoel.com/logo3d/
      (my site/app)

    26. Re:Eh? by JAlexoi · · Score: 1

      Objective-C is higher than C#? I find it really, really, really hard to believe.

    27. Re:Eh? by timeOday · · Score: 2
      Nice graph.

      Just speculating here, but I expect Objective-C to level off since it's essentially bound to one company, Apple.

      Java, sadly, seems to be in decline as it transitions form a real programming language to a vendor-specific one. (Granted C# is still enjoying a very long-term, steady rise, but Oracle isn't Microsoft...)

    28. Re:Eh? by Anonymous Coward · · Score: 1

      Logo is awesome in 3D: http://www.awolnoel.com/logo3d/

      (my site/app)

    29. Re:Eh? by tibman · · Score: 3, Interesting
      --
      http://soylentnews.org/~tibman
    30. Re:Eh? by Anonymous Coward · · Score: 0

      In fact if the trend continues, Objective-C will be the most popular language in about 3 years.

      Right after the year of the Linux desktop.

    31. Re:Eh? by Waffle+Iron · · Score: 1

      >19 - Logo - 0.652%

      People still use this? I remember this being a toy language for kids to learn how to program.

      So was BASIC, which is now apparently at #7.

    32. Re:Eh? by rezalas · · Score: 2

      That depends on the method used to gather the information. If you consider the percentage to be the ratio of software titles released to a language and the number of companies advertising the applications that are generated when compared to the market, I'm kind of suprised that the iPhone hasn't driven that number much higher. Mind you, they aren't basing these stats on lines of code, or even the real strength of the language within the programming community: they are basing it on popularity at the moment. FTA "The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. The popular search engines Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings. ".

      From what I can tell the numbers are highly inflated by ads, increased numbers of classes for "non-programmers" trying to make it big in the app world, and small businesses advertising for short term contract work to build a simple app. Personally I think these language numbers are skewed too heavily and too easily to hide the truth. C/C++ (of which I don't program in professionally right now) are both extremely popular and have been for a long time. I don't see that changing any time soon, just as I don't see most established languages being replaced (Cobol programmers right now are at a premium).

    33. Re:Eh? by jones_supa · · Score: 2

      As I see your message twice now, I assume it can be seen in 3D using some special glasses.

    34. Re:Eh? by Anonymous Coward · · Score: 0

      I've taught programming with Logo, it _is_ very much like other programming languages, it has functions, can do recursion.... etc.. plus there is Lego for Logo (or is it Logo for Lego...w/e) that allows you to program the Lego Mindstorm robots with logo... I was in charge of an 8 year old and a 12 year old, and they were both able to do it. We only had 2 weeks, but the 12 year old understood functions well enough to write her own (the 8 year old just played and drew houses with Logo... but that was fine) So don't assume that it is without its merits.

      Now that there is Alice... Logo might not be as attractive... but it still is not _bad_ at all for entry level young programmers.

    35. Re:Eh? by Cinder6 · · Score: 1

      That depends on if you expect Apple's record-breaking growth to continue or to taper off. But I agree--it's hard to see Objective-C as the most popular language.

      --
      If you can't convince them, convict them.
    36. Re:Eh? by Anonymous Coward · · Score: 0

      >19 - Logo - 0.652%

      People still use this? I remember this being a toy language for kids to learn how to program.

      The turtle probably still hasn't arrived in the lower right corner of the screen...

    37. Re:Eh? by Dog-Cow · · Score: 1

      Of course there's an excuse for it. And a reason too. So there!

      All you have to do is turn warnings to errors and it will be a compiler-time error. And the kinds of programmers that release an app with warnings is the kind that's going to screw something else up anyway.

    38. Re:Eh? by Anonymous Coward · · Score: 0

      I am not impressed, I was writing (simple) applications in Commodore64 assembler language using peek and poke (I made basic program helping me to enter assembler program myself) when i was 7 years old, Logo is light-years above that level/simpler language (and no I could not afford Commodore128)

    39. Re:Eh? by Cinder6 · · Score: 2

      Maybe you should try understanding the language? Objective-C is dynamic. That means it won't do type checking the way other languages will. You have to be a little more careful than with other languages, but it does have its benefits--some of which are described here.

      Also, Xcode will definitely spit out a warning if you try something like that, and you can always turn on "treat warnings as errors". You act like it will merrily leave you clueless as to your mistake, which is untrue unless you suppress warnings. (You can also use forwardInvocation: or exception handling if you have no way of avoiding the situation.)

      --
      If you can't convince them, convict them.
    40. Re:Eh? by Creepy · · Score: 1

      no, Logo is similar to Lisp but without the parens, as someone mentioned. It was also the primary influence for Smalltalk, as I recall.

      and Turtle graphics is not Logo, but as I recall Logo has no formal definition, so there are about 200 different implementations that are not compatible, some of which may be turtle graphics.

    41. Re:Eh? by Joce640k · · Score: 0

      Summary contains 2008 data, article contains current data. C is awesome incarnate: lean, readable and full of low level goodness.

      One word: Bollocks.

      Question: Why aren't you using assembly language? It has even more of the low level goodness of C...!

      When you have the answer to that typed up, substitute C/C++ for asm/C and you'll understand what C++ programmers think of C programmers.

      How on earth can you think that malloc()/free()/strcat()/strdup() and raw pointers is good programming practice?

      --
      No sig today...
    42. Re:Eh? by Anonymous Coward · · Score: 0

      Basically you do not know Logo at all.

    43. Re:Eh? by s73v3r · · Score: 1

      Well, for one, why the hell are you trying to send a message that doesn't exist? What the hell would you expect to happen? And if you're going to say something about not knowing if that method exists, there's always +respondsToSelector

    44. Re:Eh? by Grishnakh · · Score: 1

      No, C is probably something more like Old English, before the year 1100. Modern English is more like the latest version of C++.

    45. Re:Eh? by Grishnakh · · Score: 1

      Java, sadly, seems to be in decline as it transitions form a real programming language to a vendor-specific one.

      It doesn't help when that one vendor is suing anyone who uses it. Why would you want to use Java these days for anything important, knowing that you could be sued next?

    46. Re:Eh? by Xest · · Score: 1

      You can't infer anything from this list, the metrics it uses are less than useless and time and time again it appears on Slashdot, and time and time again people make invalid assumptions from it.

      This page explains how they've compiled the list:

      http://www.tiobe.com/index.php/content/paperinfo/tpci/tpci_definition.htm

      If a language doesn't have an entry on Wikipedia, then it's not considered.

      The whole methodology is a complete train wreck. They just search the top 9 Alexa sites that have a search box, and weight based on the size of the site. Not only does this mean important programming sites like Stack Overflow are completely ignored, are largely ignored but the whole methodology has more flaws than you can count. One prominent example is it means that if a language is well documented and/or easy to use and people don't need peer-support so much, then it'll likely get less hits than a language that has fuck all documentation and so the net is full of sites explaining how to do this, that, and the other. It also means older languages, for which more sites on the net exist will always retain greater popularity. Note that they also manually tweak the results anyway with an arbitrary confidence factor per language.

      I've long said that personally I believe the best metric if you're interested in this sort of thing is to simply search tech job sites, for various areas and just have a look at what sort of languages companies are recruiting for. If you do that - gather a picture of what companies are really interested in by looking at what they're recruiting for you'll find a completely different picture to that that this pointless TIOBE index gives. Suddenly for example, PHP, C#, and Javascript fly up the charts, whilst C drops quite markedly.

      The only thing this chart is good for is trying to argue some point from a biased standpoint if the chart just happens to coincide with the language argument your having. Beyond that it's of little value for anything, as it certainly doesn't really bear much resemblance to what's going on in the industry for the most part.

      I have no doubt C++ is rising against with it's latest release being pretty cool, but I think it's got an awful lot of ground before it's back on top, and as for plain old C? I don't think anyone in the industry in their right mind would genuinely believe C has been anywhere near the top for probably over a decade now. If it was C++ sure you might be able to argue it, but, C? seriously? It's been almost entirely relegated to the realm of embedded programming and really little else and even there isn't the only player in town. Don't get me wrong - I love C, it was my first language so I'll always have a special appreciation for it, but these stats are just retarded.

    47. Re:Eh? by Darinbob · · Score: 1

      Oh, did it die? I didn't even know it was sick.

    48. Re:Eh? by Darinbob · · Score: 1

      C is like Latin. Clear, concise, expressive, and still in wide use a couple thousand years later in areas that the masses don't think about much.

      (ok, just noticed the pun)

    49. Re:Eh? by Greyfox · · Score: 1
      I never really see the point of being able to "put anything in a container." You're going to know what's in there at some point anyway. Could be all razor blades and broken glass, and if you just go reaching into the container and fumbling around you're going to end up with lacerations. Or a loop with a big switch statement with some RTTI, almost as bad as lacerations. Or you can just stuff some objects that implement "callback" that you can call back when you pull them out of the container. That's equally as easy to do in C++ and Java (And not terribly difficult in C, funnily enough.) You'd just use an interface or a virtual base class in one of those languages.

      Not that I'm complaining about Objective C or anything. I'm just always surprised to see people so gung-ho about that one particular thing. It's not like it's all that hard to make and maintain a new container to put other things in. People always act like they're only allowed to use just one thing. Most of the examples I see are really examples of bad design rather than any advantage a specific language has.

      --

      I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    50. Re:Eh? by Anonymous Coward · · Score: 0

      Toasting with my Hefe Weisse to the memory of Ritchie.

      Cheers, and thanks for the C language!

    51. Re:Eh? by dkf · · Score: 2

      How on earth can you think that malloc()/free()/strcat()/strdup() and raw pointers is good programming practice?

      It's pretty horrible, but it doesn't have the deployment horrors that C++ does. (I've worked with a few programs that were C++ and building redistributable binaries of them was always a pain; when the developer switched to using C, the problems went away.)

      The real problem of C++ (apart from its half-assed-ness in the OO department, from a Smalltalk perspective :-)) is that it tends to bind consumers of interfaces very closely to the implementations of those interfaces. Yes, this makes the object code fast, but the cost is that it also makes it much more brittle. Having to recompile the world (a slow business with C++, unlike most other languages) just because of the addition of a private variable to a class definition is not a winning strategy, and PIMPL is a band aid. (It also tempts programmers into writing inline methods to "simplify" access to the implementation fields and methods, all of which is heading rapidly back into the hell of tight binding.)

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    52. Re:Eh? by BasilBrush · · Score: 1

      Wrong. I've just tried it, and it gives the error "Receiver type 'Foo' for instance message does not declare a method with selector 'undefinedMethod'"

      No excuse for claiming a problem that doesn't exist.

    53. Re:Eh? by Black+Parrot · · Score: 1

      Are you sure you are not talking about prolog?

      Right, thanks.

      Senility always sets in early in my family...

      --
      Sheesh, evil *and* a jerk. -- Jade
    54. Re:Eh? by BasilBrush · · Score: 1

      The trend for the Linux desktop would make it 100 years or more, not three.

    55. Re:Eh? by shutdown+-p+now · · Score: 1

      It's pretty horrible, but it doesn't have the deployment horrors that C++ does. (I've worked with a few programs that were C++ and building redistributable binaries of them was always a pain; when the developer switched to using C, the problems went away.)

      What exactly are the deployment horrors that C++ has but C doesn't? You can statically link the C++ standard library, too, you know...

      The real problem of C++ (apart from its half-assed-ness in the OO department, from a Smalltalk perspective :-)) is that it tends to bind consumers of interfaces very closely to the implementations of those interfaces. Yes, this makes the object code fast, but the cost is that it also makes it much more brittle. Having to recompile the world (a slow business with C++, unlike most other languages) just because of the addition of a private variable to a class definition is not a winning strategy, and PIMPL is a band aid. (It also tempts programmers into writing inline methods to "simplify" access to the implementation fields and methods, all of which is heading rapidly back into the hell of tight binding.)

      That's the price you pay for performance. If field access is just a single offset read from the beginning of the object, it's as fast as it gets (esp. if the object itself is directly on the stack, and there's nothing to dereference), but then object representation in memory becomes part of the ABI. Pimpl basically discards the speed advantage to give you a stabler ABI as can be seen elsewhere - in that sense, it's not a band-aid, so much so as a manifestation of the typical C++ philosophy of "you don't pay for what you don't use".

    56. Re:Eh? by jmorris42 · · Score: 1

      > That depends on if you expect Apple's record-breaking growth to continue or to taper off.

      It must. If you don't believe they have a shot at overtaking Microsoft on the desktop it will slow pretty soon now. And if you assume Google and the hordes of clones will supplant iOS in exactly the same way the hordes unleased by Compaq's cloning of the IBM PC doomed both IBM and Apple to Microsoft's domination back in the day then their growth curve is probably close to max right now. But even if both assumptions are incorrect they will not be able to maintain their current growth a whole decade because at current growth rates they will be bigger than the entire PC, tablet and smartphone ecosystems before then and that isn't probable if ya know what I mean.

      > But I agree--it's hard to see Objective-C as the most popular language.

      Same here, even if Apple remains a dominating influence. Because HTML5 + Javascript is the future on damned near everything with a GUI. Bleh.

      --
      Democrat delenda est
    57. Re:Eh? by Anonymous Coward · · Score: 0

      Article made me think more of this, actually: http://xkcd.com/904/

      "This just in! Random fluctuations have caused something that is newsworthy but not statistically significant!"

    58. Re:Eh? by ADRA · · Score: 1

      Thanks troll. Google is the ONE company being sued, and there's a really good rationale for WHY they were sued vs. the multitude of other companies using Java based technologies. That doesn't mean that the law suit will enevitably end up in Oracle's favor (probably not unless they get patent wins).

      Before Oracle actually bought Sun, they were probably invested into the multi-billion dollars a year revenues from Java based products. Was there ever the thought that they were going to get their asses sued? No they were following the licenses as issued and they 'followed the rules'. Java products doesn't make it a legal hurdle unless:
      1. You use their patents
      2. You release a java-clone and call it Java without being 'certified' and licensed
      3. You copy/paste part of the Oracle based source into your product

      --
      Bye!
    59. Re:Eh? by Anonymous Coward · · Score: 0

      Because HTML5 + Javascript is the future on damned near everything with a GUI. Bleh.

      They said the same thing about Java years ago. Those that do not learn from the past are doomed to repeat it.

    60. Re:Eh? by Anonymous Coward · · Score: 0

      Javascript is 2% How is that possible?

    61. Re:Eh? by dave87656 · · Score: 1

      IMHO C++ is a dialect of C and the two should be lumped together. One of the problems I've had with Java (which I've been using for the past 12 years) is that it is difficult to extend. It's not impossible, but I found the inability to pass arguments by reference made it difficult to make useful functions. BigDecimal is useful but extremely painful to use. Dates weren't done well at all.

      At the beginning of the project, I had to write parts of it in C/C++ and GTK2 which I found quite nice and responsive.

  3. 64 bit porting? by jellomizer · · Score: 1

    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 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.

    --
    If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    1. Re:64 bit porting? by vlm · · Score: 3, Interesting

      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.

      --
      "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
    2. Re:64 bit porting? by Anonymous Coward · · Score: 0

      I didn't find what systems are included in this index but for every computer you have you probably have a couple of embedded systems. Pretty much every 8-bit controller is programmed with C today, perhaps some assembly for the legacy stuff.

    3. Re:64 bit porting? by jellomizer · · Score: 1

      The 64 bit migration first was on the Server Side, Linux is a Server OS. So Linux, Solaris, etc... Had been ported to 64bit a while ago. But now standard PC's are now 64 bit. So we are now pushing towards the Desktop move to 64 bit code.
      While migrating to 64 bit on the servers wasn't seamless. However most Server Side code was more 64 bit ready then Desktop code. As the migration to 64 bit is one part, the second part is moving to Multi-cores. Servers had been using Parallel processors for a while now. Multi-Core is new to the Desktop. So a lot of old Apps are being redesigned to run more parallel.

      Migration to 64 bit roughly is a recompile away in C. However you are compiling on a newer Compiler so your code may need some altering (usually for the better). But going from a single CPU to multi-core use. That requires redesign on how your program works.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    4. Re:64 bit porting? by petermgreen · · Score: 1

      I don't think the debian amd64 port was released until 2007 ish, I think as part of Debian 4.0/etch

      There was a semi-official amd64 port of sarge but etch was indeed the first release where it was included in the official archive.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    5. Re:64 bit porting? by mosschops · · Score: 1

      Windows 7 x64 can't run 16-bit apps*, and all Windows 3.1 apps are 16-bit, so it can't actually run ANY Windows 3.1 apps.

      * actually, there's a reimplementation to support some 16-bit installers, but they're still not executed natively.

    6. Re:64 bit porting? by Anonymous Coward · · Score: 0

      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

      Done already. Go try to buy a windows computer (other than a atom based computer) that is 32 bit only. They are rather rare in the stores these days. The only real thing holding back 64 bit on windows these days is firefox. Even flash finally got around to doing 64 bit.

      Most of the people I know have been running 64 bit and they do not even know it (or really care).

      They did something most linux distros are now just getting around to. They put in a 32bit thunking layer. Honestly 64 bit on linux was rather a disaster comparatively how easy it went for me with windows. I have maybe 1 program that I had trouble installing and running.

    7. Re:64 bit porting? by monkeyhybrid · · Score: 1

      Woah, what's with the crazy capitalisation?

    8. Re:64 bit porting? by jgrahn · · Score: 1

      The 64 bit migration first was on the Server Side, Linux is a Server OS. So Linux, Solaris, etc... Had been ported to 64bit a while ago. But now standard PC's are now 64 bit. So we are now pushing towards the Desktop move to 64 bit code.

      Linux is not specifically a server OS. Linux and Unix applications ("desktop" and otherwise) were worked on amd64 systems from the start, because they had been ported to things like 64-bit Solaris years earlier. Or, they had been well-written.

    9. Re:64 bit porting? by Anonymous Coward · · Score: 0

      Really?! Am I just some special case or some shit?

      1. Firefox is holding back 64bit on Windows still? That was one of the first things I had going on 64bit on Linux; required that I did some hacking (honestly, I just said fuck it and installed 2 versions of Firefox--1 64bit and 1 32bit--initially, and until the 64bit flash came around, there was a few other hacks out there as well) for flash, but otherwise, it worked really well for me.

      2. I bought a 64bit AMD processor probably 6mo to a year after AMD started selling them, and I was running 64bit Linux just fine on it from pretty early on (definitely long before a reasonable 64bit Windows existed). Maybe my insistence on Gentoo or a Gentoo-based distro at the time was behind how well it went for me, but the only bad luck that I had with it at all was trying to get 32bit plugins working with 64bit apps... 32bit pieces themselves never really caused me a big problem, nor did any of the 64bit pieces--only when the two were actually trying to work together more...

  4. When will people learn... by wpi97 · · Score: 4, Insightful

    C and C++ are two separate and very different languages.

    1. Re:When will people learn... by jellomizer · · Score: 1

      Not that different.
      For the most part if you write C code in C++ the code works fine.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    2. Re:When will people learn... by wpi97 · · Score: 4, Insightful

      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.

    3. Re:When will people learn... by Drethon · · Score: 1

      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 ultimately the same thing at the advanced level.

    4. Re:When will people learn... by Artraze · · Score: 1

      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.

    5. Re:When will people learn... by jellomizer · · Score: 1

      Well the difference is this.

      FORTRAN
      PROGRAM HELLOWORLD
            WRITE *, "HELLO WORLD"
      END

      vs.

      C++/C
      #include
      int main (char argc, char** argv) {
            printf("HELLO WORLD");
            return 0;
      }

      When you write FORTRAN code it only really works in fortran. When you write C code it work most of the time in C++. Although C++ is designed to program it differently. So if you see Real C++ code you know you are not in C. However C++ has a lot of back wards compatibility to C. And a lot of the details still match C.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    6. Re:When will people learn... by Anonymous Coward · · Score: 1

      Writing C that cannot be compiled as C++ is extremely short-sighted. It is an established best practice to code C to be compatible with C++ compilers. C is callable from C++ (and vice-versa) on all reasonable platforms. Those who emphasize "two separate languages" are promoting a futile and needless divergence. They're the same kind of "talk is cheap" programmers that like to frustrate useful optimizations by blogging about esoteric implementations of inheritance and arcane architectures with weird sizes of primitive types. It is extremely useful, and depended on by most mainstream C/C++ development, that C remains, for all practical purposes, a subset of C++, which is why the useful C99 features are in C++.

    7. Re:When will people learn... by UnknownSoldier · · Score: 5, Interesting

      > 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.

    8. Re:When will people learn... by Hentes · · Score: 1

      C++ is a multi-paradigm language which means that it doesn't have a single philosophy like Java, but permits you to write in any style you want. What is horrible is writing C++ code in C, trying to painfully emulate OO and other functions of the language, but not using C++ because it's not l33t enough.

    9. Re:When will people learn... by vlm · · Score: 1

      Its all in the libraries.

      Kind of like how I am intimately familiar with Perl and Ruby and they're similar, sorta, in how Perl can usually be trivially dumped into Ruby and then search and replaced and hacked up to run.

      However, I'm not really a Perl programmer, I'm a CPAN programmer. My "perl" scripts are merely some glue and bug/issue fixes between weird CPAN routines. That is the problem with going from Perl to Ruby.

      z=x+y; doesn't require much work either in the Perl-Ruby transition or the C-C++ transition. Outside/addon libraries are a hairpulling nightmare.

      Its not just the syntax changes either to use a different library name and maybe some different limitations and parameters... its the crazy code I put in Perl to work around some bug/issue that needs to be removed and then new crazy code in Ruby to work around some ruby gem limitation.

      Oh and then testing.

      --
      "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
    10. Re:When will people learn... by robthebloke · · Score: 5, Interesting

      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.

    11. Re:When will people learn... by Black+Parrot · · Score: 3, Informative

      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.

      --
      Sheesh, evil *and* a jerk. -- Jade
    12. Re:When will people learn... by tigeba · · Score: 1

      "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"

      I think this is a rather dubious assertion unless you further qualify this by saying "console games" or possibly 'box retail games". Even with that caveat, it might be hard to argue, since the majority of the code for these games might be in a high level language backed by a core that might be c/c++.

      I would also argue that the component/data driven design of many games and game engines primary goal is flexibility and extensibility, with a huge side benefit being the possible memory and performance benefits. I concede that my opinion there is highly subjective :)

    13. Re:When will people learn... by tibman · · Score: 1

      i still prefer printf to cout. Who wouldn't?

      --
      http://soylentnews.org/~tibman
    14. Re:When will people learn... by jellomizer · · Score: 1

      Not always. Helping minimize developers time can help improve run time speed. If I am writing in a low level langue and I need to do a sort, and I am pressed for time, I just may do a bubble sort as it is the the easiest one to code and test. Using a higher level languages List.sort() feature will use a more efficient sort.

      In a perfect world C would be faster, as every thing can be optimized. However real world gets in the way we have deadlines and need to find ways to get the code out. Higher level languages gives us Medium-Fast implementations that when combined may give us a net faster speed then without. As we may not have the time to know of or give an optimal code.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    15. Re:When will people learn... by Anonymous Coward · · Score: 0

      As much as I wanted to prove myself wrong, I've always found that virtual method calls to nontrivial methods are of no consequence. Sure as heck you don't want to use a function object with virtual operator() that adds two ints together and is called from a tight inner loop, but I doubt that's a big problem in real code. The biggest overhead with C++ is with too much copy construction and too much premature optimization in the standard library, and that's what profiling my own code usually shows. The former is solved with move semantics, and by rvalue references in the newest C++ standard. The latter problem is that copy-on-write on plain old data is usually a very, very bad performance hog unless you're dealing with big contents. Many widely deployed C++ libraries have COW string and container implementations that do COW even when the container's size is a few dozen bytes. The overheads of thread-safe COW housekeeping can, in pathological but not unheard of cases, make the container's overhead go up by an order of magnitude.

      OOP is not inherently slow, it's just that people blindly assume that they don't need to educate themselves before using it. I don't think you can do any sort of decent C++ job without first reading and understanding all of Myers and similar books.

    16. Re:When will people learn... by tibit · · Score: 1

      I don't think that developers of eigen would agree with you. On the contrary, their works shows how using C++ can and does lead to higher performance without sacrificing programmer productivity.

      --
      A successful API design takes a mixture of software design and pedagogy.
    17. Re:When will people learn... by tibit · · Score: 1

      C-like languages, with exception of C#, make it impossible to implement some very common constructs that are trivial to do in assembly. Try implementing coroutines in C or C++.

      --
      A successful API design takes a mixture of software design and pedagogy.
    18. Re:When will people learn... by Anonymous Coward · · Score: 0

      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. ...

      If you don't know much about templates vs. performance, I recommend you read item 48 in Scott Meyer's Effective STL. It will explain you where template code outperforms raw C code and why there is no chance any C construct could attain the same speed in these situations.

    19. Re:When will people learn... by Anonymous Coward · · Score: 0

      "OOP" is slow..? Huh??

    20. Re:When will people learn... by swan5566 · · Score: 1

      No, that's not always the case. Yes, you do want to have your algorithms as efficient as possible, but code efficiency can still make an order-of-magnitude difference in many cases, and there are times in a competitive market where if you don't get that extra speed-up, your competitor will. The bottom-line is that there's no clear winner here - it all depends on the motivation, the code complexity and size, programmer talent, and the like.

      --
      In debates about Christianity, there are two groups: those looking for answers, and those looking to just ask questions.
    21. Re:When will people learn... by swan5566 · · Score: 1

      Big-O notation stuff only really starts to matter when n is large, but if you're dealing with a bizillion instances where n is small?

      --
      In debates about Christianity, there are two groups: those looking for answers, and those looking to just ask questions.
    22. Re:When will people learn... by PhasmatisApparatus · · Score: 1

      The closer to the hardware you get, the more the lines blur between the CS ideal (Big O) and the hardware reality (registers and bandwidth and machine code interleaving). You really can't optimize for one without optimizing for the other.

      Another interesting fact about low-level languages is that it is much more difficult for bugs to hide. Writing correct code is nearly the same as writing understandable code. The only things that can go wrong (huge functions, tons of global variables, etc.) could just as well go wrong in a higher level language. Just look at all the ruby and python developers writing code that translates easily into c, and only throwing in a class or two to look OOP.

    23. Re:When will people learn... by Kergan · · Score: 1

      Alternatively, you can read the C++ FQA:

      http://yosefk.com/c++fqa/

    24. Re:When will people learn... by Anonymous Coward · · Score: 0

      When you have some junior coder sticking a virtual function call inside a for loop...

      Holy crap. If performance is so critical that you're worried about the overhead of virtual functions, C++ is not the language for you. The only reason to use C++ is that it's object oriented, so you better be making heavy use of things like that.

      it doesn't help dealing with performance issues when you have MANY objects. I.e. Template Bloat...

      Template bloat??? Templates are statically resolved at compile time. If you're using a bunch of templates everywhere, you've made your executable larger, but it's not impacting your performance anymore than creating multiple multiple classes for each data type you're using...because that's exactly what the compiler did for you.

    25. Re:When will people learn... by Desler · · Score: 2

      Ok. Co-routine libraries for C and C++ which list nearly a dozen implementations. I await the imminent 'but those aren't real co-routines' response. Did you even spend 2 seconds to Google this before shooting of your mouth?

    26. Re:When will people learn... by Anonymous Coward · · Score: 0

      What if you have an optimal big O solution, but the constant in front is big? Cutting that constant in 1/4 while still getting the same scaling as working set grows has obvious benefits. You obviously have no experience writing a piece of software where performance matters and good performance is difficult to achieve given your workload and hardware.

    27. Re:When will people learn... by Anonymous Coward · · Score: 0

      People who actually know what they are doing.

    28. Re:When will people learn... by Anonymous Coward · · Score: 0

      If you want performance, you don't use C you use C++ template metaprogramming. There are benchmarks out there showing some of Boost::Spirit's I/O routines as faster than the C I/O routines for the same datasets on the same hardware. The key is that template metaprogramming allows one to embed the unwinding of loops and the like inside the binary itself, so the CPU is just reading a binary rather than doing any processing.

      Seriously worth looking at if you're performance considerate.

    29. Re:When will people learn... by Megane · · Score: 2

      When you have some junior coder sticking a virtual function call inside a for loop

      If that function really needed to be virtual, it's a lot better than sticking a switch statement into EVERY for loop that uses it, with each branch calling the special function for that class type. (Not to mention needing to update every one of those switch statements when you add another subclass!) Or creating yet another function with that switch statement so you can keep it in one place. Or you could put a proc pointer in the struct, which is essentially the same thing as a virtual function call, only with uglier syntax.

      Not to mention that the vtable entries are effectively const, so even when using a virtual function, if you're doing multiple operations on the same object, the vtable access can be kept in a register for multiple calls.

      And if that function really didn't need to be virtual, simply not declaring it virtual will cause C++ to compile a static call. That's what sets C++ apart from other object-oriented languages, though it can bite you in the ass if you don't understand it.

      If you're going to complain about "junior coders" doing something, at least complain about something sensible. The real problem of C++ isn't speed, it's size, due to code bloat from excessive template use, with some degree of "write-only code" due to templates.

      (I use C++ in an embedded systems environment, so templates, exceptions, RTTI, and non-placement new are right out. But "C with classes" works great where you would have to do switch statements or proc pointers. The win is in code that's easier to understand, if you do it right.)

      --
      #naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
    30. Re:When will people learn... by Megane · · Score: 1

      The design of cin/cout always struck me as someone showing off. "HEY LOOKIE! I can override the shift operators to do this awesome looking I/O stuff!" Also, the FQA has some examples of where it can bite you in the ass, like leaving the stream in hexadecimal mode, because that string of operators doesn't have any way to tell the object that "I've ended the statement, so please reset back to defaults kthx!"

      --
      #naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
    31. Re:When will people learn... by Anonymous Coward · · Score: 0

      Most game devs and hardware benchmarks indicate that a modern game is more likely to be GPU limited, not CPU limited.

      Seriously, do whatever you want in the CPU. So long as it isn't too obscene, like O(2^x) type stuff, any modern CPU should be able to overcome any language inefficiencies as trivial.

    32. Re:When will people learn... by Anonymous Coward · · Score: 0

      I think you need to pop your head over the parapet once in a while, my friend. Many people use C++ as a "better C" and this idiom is well respected by those in the know - far more so than Alexandrescau and his insane nonsense. It is also an idiom which C++ supports entirely by design. Read Stroustrup sometime. The cabal of people who think C++ is all about wanking over traits and boost::bloat may be vocal, but they're not the only people using the language, and if you want to write code as if academic cleanliness was the most important aspect there are FAR better languages than C++ to do it in.

    33. Re:When will people learn... by Anonymous Coward · · Score: 0

      SIMD instructions are vector operations, so instead of adding one value at time, you add an array of values, for example 4 or 8 integers. This is very useful for speeding up alogirthim that use DSP or Image processing for example, because you can work on four pixels or PCM samples.
      I don’t know how is SMID related to object oriented? I have seen many codecs (video and audio) written in C++ using multithreading and template in an efficient and elegant way.
       

    34. Re:When will people learn... by Anonymous Coward · · Score: 0

      SIMD instructions are vector operations, so instead of adding one value at time, you add an array of values, for example 4 or 8 integers. This is very useful for speeding up alogirthim that use DSP or Image processing for example, because you can work on four pixels or PCM samples with one operation.
      I don’t know how is SMID related to object oriented? I have seen many codecs (video and audio) written in C++ using multithreading and template in an efficient and elegant way.

    35. Re:When will people learn... by Anonymous Coward · · Score: 0

      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.

      Asymptotic complexity is about what happens for inputs that are both worst case and arbitrarily (read: infinitely) large. Often inputs are not worst case, and they certainly are never arbitrarily large, so big-O notation doesn't ever apply to any specific run of an algorithm. You have been misinformed in school. What does matter is how an actual implementation of an algorithm behaves for the inputs actually encountered by your program. Now granted, the kind of thinking that goes into big-O analysis (as opposed to the actual big-O notation itself) can sometimes (not always) be useful to get a very rough estimate of how that is going to turn out for large inputs. So yes, algorithms matter, but if you think big-O is always the best way to determine which algorithm is better for any specific purpose, you are in for a lot of surprises.

      The idea that algorithm choices are always more important than implementation is a half truth. If you are comparing two algorithms, sometimes one algorithm is so much better that it doesn't matter how you implement it - it is still better. Often that is not the case. However, the issue here is that there is not a fight between algorithm choice and implementation - they are complementary and both important. Once you've identified the best algorithm or at least a very good algorithm, implementation and hardware is all you've got left when it comes to increasing performance of your software. If you are working in a language that runs at half or 1/100 the speed, then once you implement the best algorithm and someone else who used a faster language does the same, you'll still be slower.

      There are many reasons to choose a higher-level language and correctness of programs is not the only proper one. In any case high level does not mean low performance. Dynamic languages are usually high level, and they are certainly not optimized to make it harder to make errors than for example the safe subset of D. They are optimized for increased developer productivity on smaller projects, which is exactly what the OP was talking about. Correctness is something you get by spending enough time to test, review and debug the program, so indeed, even increased correctness would in the end boil down to the OP's point - increased developer productivity.

    36. Re:When will people learn... by Zaphod+The+42nd · · Score: 2

      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 a pretty TINY amount of code.

      If anything, we're moving the other direction, even in mainstream games. Games like Rage, which while running in an engine of C++, have scripting languages running ON TOP of them. Those scripting languages are FAAAAR less efficient than compiled OOP C++, so if that was such a concern, why would they use scripting languages?
      Because for your non-bottlenecks, IT DOES NOT MATTER. Most of the game development just needs to get done as fast as possible, with as little effort as possible, and more and more major game developers are turning to inefficient scripting engines to handle the actual game logic. They only do the absolute bare minimum in hard C.

      So, yeah. C++ is backwards compatible with C, but if you're writing C code in C++, you're almost 100% guaranteed to be doing it wrong. Backwards compatible doesn't mean equivalence.

      --
      GCS/MU/P d- s:- a-- C++++$ UL++ P+ L++ E+ W++ N o K- w--- O M+ V- PS+++ PE Y+ PGP t+ 5- X R++ tv+ b++ DI++ D++ G+ e++ h-
    37. Re:When will people learn... by Zaphod+The+42nd · · Score: 1

      If you've got a bizillion instances, then that is your n. If you've got a problem O(1) and you've got to run it n times, that O(n). Just because its parallel doesn't change the algorithm complexity.

      --
      GCS/MU/P d- s:- a-- C++++$ UL++ P+ L++ E+ W++ N o K- w--- O M+ V- PS+++ PE Y+ PGP t+ 5- X R++ tv+ b++ DI++ D++ G+ e++ h-
    38. Re:When will people learn... by Zaphod+The+42nd · · Score: 1

      Having access to sorting libraries or existing code libraries isn't really a feature of a high level language. Low level languages can have a sort library too. You don't need OOP for that. You could have a GOTO SORT or whatever.

      But I agree on your analysis that real world value matters.

      --
      GCS/MU/P d- s:- a-- C++++$ UL++ P+ L++ E+ W++ N o K- w--- O M+ V- PS+++ PE Y+ PGP t+ 5- X R++ tv+ b++ DI++ D++ G+ e++ h-
    39. Re:When will people learn... by Hentes · · Score: 1

      Complexity theory is based on some assumptions (assuming a worst-case scenario or that n is very big) that are rarely true. Because of this, there are several examples where it fails: that's why quicksort is faster than heapsort and hashtables are faster than trees. If speed is important to you, you should benchmark instead of relying on complexity.
       

      Also, no amount of speed-up makes up for code that is wrong.

      OP was talking about game programming, and game programmers seem to think differently.

    40. Re:When will people learn... by Bill_the_Engineer · · Score: 1

      Is it okay to say that Objective-C and C is the same language too?

      --
      These comments are my own and do not necessarily reflect the views or opinions of my employer or colleagues...
    41. Re:When will people learn... by Anonymous Coward · · Score: 0

      OOP is currently being stabbed to death by concurrency & parallelism, and there is nothing anyone can do to save it.

      Really? Are you talking about object-oriented programming, parallelism and concurrency in general, or in a specific context? Because if you are speaking about the general situation, you are patently wrong. In the general context, the best possible efficiency is not a prime priority, while correctness is. Parallelism and especially concurrency is notoriously hard to do correctly and verify. Encapsulation is a great help here, because appropriate encapsulation makes it much easier to reason about an object and its valid state, as well as guaranteeing that certain invariants hold for it. The abstractions of object-oriented programming also support the many different concurrency primitives very well. Just look at languages such as Java, with many different concurrency libraries, or Scala, which supports libraries such as parallel collections[1] and actors[2]. While OOP is far from the only paradigm that works well with concurrency and parallelism (an example is the functional paradigm), it is not fundamentally at odds with parallelism and concurrency, especially when combined with the functional paradigm.

      Of course, object-oriented programming does in general incur some constant-time overhead, and this is not acceptable in certain contexts. But these contexts are far from what the general picture is. OOP, especially together with functional programming, is flourishing with concurrency and parallelism like never before. I have to wonder if your experience with OOP in C++ have turned you against the object-oriented paradigm, especially if you work in a context where the constant-time overhead matters*. But just because OOP is not a good fit in every single context doesn't mean it isn't a good fit in most contexts.

      (*: OOP in C++ is considerably weaker at some points than in other languages, because there is no standard garbage collection. Because C++ lacks support for that, implementing efficient immutable collections and datastructures become much more difficult, and thus there are few or no immutable collections and data structures in it (no, I am not talking about "const collections", I am talking about proper immutable collections that for instance share memory between instances). With C++11 and things like a proper memory model (note: long after Java got one), closures and shared_ptr, it has become substantially easier, but that doesn't mean it isn't bloated doing it compared to other languages such as Java).

      [1]: http://docs.scala-lang.org/overviews/parallel-collections/overview.html
      [2]: http://docs.scala-lang.org/overviews/core/actors.html

    42. Re:When will people learn... by Anonymous Coward · · Score: 1

      Because

      printf("0x%08xn", x)

      is way more verbose and confusing than

      std::cout std::hex std::setfill('0') std::setw(8) x std::dec std::endl;

    43. Re:When will people learn... by Zaphod+The+42nd · · Score: 1

      Agreed. Having stream insertion and bit shifting operations near each other is ugly as hell. I like having the freedom to define crazy operator overloads if I want to in custom classes, but it almost always ends up being a mistake in the long run. So while I complained at first, I'm actually glad Java doesn't let you, and I think C# only lets you overload the more basic operators. Its too easy to forget what exactly + one class does versus / another class.

      --
      GCS/MU/P d- s:- a-- C++++$ UL++ P+ L++ E+ W++ N o K- w--- O M+ V- PS+++ PE Y+ PGP t+ 5- X R++ tv+ b++ DI++ D++ G+ e++ h-
    44. Re:When will people learn... by Joce640k · · Score: 1

      Not that different.
      For the most part if you write C code in C++ the code works fine.

      Wrong!

      The difference isn't in what the compiler accepts as valid input.

      C - malloc()/free()/strcat()/strdup, manual everything.

      C++ - std::vector/std::string, smart pointers and stack unwinding to automate memory management for you (who needs garbage collection? Not C++ programmers...)

      That's just the obvious differences ... C++ supports a totally different programming style and way of thinking.

      --
      No sig today...
    45. Re:When will people learn... by Joce640k · · Score: 1

      C is a good language because it forces one to think about runtime performance.

      C++ doesn't??

      What can you do in C that you can't do in C++?

      C++ allows you to swap in different containers, allocators and algorithms with just a typedef. C can't do that, but it's far more likely to improve performance than worrying about individual clock cycles (which C++ can also do).

      --
      No sig today...
    46. Re:When will people learn... by kraut · · Score: 2

      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?

      --
      no taxation without representation!
    47. Re:When will people learn... by Joce640k · · Score: 2

      The closer to the hardware you get, the more the lines blur between the CS ideal (Big O) and the hardware reality (registers and bandwidth and machine code interleaving). You really can't optimize for one without optimizing for the other.

      Sure ... and C++ is just as good at this as C.

      OTOH C++ is good at the big-picture stuff. C isn't.

      --
      No sig today...
    48. Re:When will people learn... by Joce640k · · Score: 1

      I think more games are written in Flash than C++...

      --
      No sig today...
    49. Re:When will people learn... by tibit · · Score: 1

      It becomes a bit of a problem if a few lines of assembly turns into a monster, doesn't it? I mean, with the whole "high level language" thing, you'd think it should be easier, not harder, right?

      Just look at those "dozen implementations". The C code almost universally requires some setjmp/longjmp functionality, while the compiler -- had it had computation-on-code a-la LISP -- could just as well take code of two coroutines and rewrite it so that it wouldn't require a separate stack frame. I am familiar with most coroutine and state machine implementations out there, and they universally suffer from basic limitations of the C model, the most major being that there's no straightforward compile-time computation, thus you can't use one set of data (or code) to generate arbitrary constant data structures and code snippets. Template metaprogramming in C++ is very limited because the compilers don't support realistic problem sizes (boost mpl is a toy just because of that). The hoops one has to jump through to provide lambda functionality in C++ is just icing on the cake :(

      --
      A successful API design takes a mixture of software design and pedagogy.
    50. Re:When will people learn... by Hentes · · Score: 1

      OOP is currently being stabbed to death by concurrency & parallelism, and there is nothing anyone can do to save it.

      I thought concurrency was one of the main driving forces behind Java. I fail to see how it would be at odds with OOP. I agree that it requires different practices, but my bet is that we will see the resurrection of functional idioms: paralellisation is much easier when you don't have to worry about the order of execution.

    51. Re:When will people learn... by Joce640k · · Score: 1

      Yawn. Not that rubbish again...

      --
      No sig today...
    52. Re:When will people learn... by bongey · · Score: 1

      What the hell are you talking about?
      1) Template bloat is just bull shit. http://blog.emptycrate.com/node/307

      "We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil"
      Donald Knuth
      Why should I really care that much about the hardware?
      Memory and CPU constraints are standard but beyond that should I really care about the hardware that much?
      That is great that you have optimised one little part of the code for the hardware but you code runs in O(n^3) time and space.

      Big O usually concerns with runtime performance and memory space. (Remember that constant factor park k )

      So the leading researchers in Computer Science are concerned about Big O and don't really care that much for hardware but you think it is the most important.
      Hmm big software companies don't really make that much money on hardware . see MS, Google , Facebook, .... it keeps going . Do they really concern themselves about the hardware?

      Oh games you say. Not everyone has the latest greatest GPU with the latest and greatest Direct X 1001 support.
      One of the biggest game platforms right now is iPhone/Android big hardware there.

    53. Re:When will people learn... by s73v3r · · Score: 1

      Works fine and being a good idea are two very different things, however. One of the more common causes of C++ bugs is that people are writing C code in C++, eschewing much more modern and safe idioms. Naked pointers using new and delete (or even malloc and free if you really want to do the C thing), instead of smart pointers, plain old arrays instead of STL containers, etc.

    54. Re:When will people learn... by Anonymous Coward · · Score: 0

      Why does your C need to be compiled by a C++ compiler? You have a C compiler right there. Just declare your headers with #extern "c" and you're fine, without needing to do all the ugly crap like explicitly casting your malloc returns.

    55. Re:When will people learn... by Joce640k · · Score: 1

      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

      You'd rather he put in a switch? LOL.

      If a function needs to be virtual it needs to be virtual. Period.

      If not, delete the word "virtual" and the code is 'fixed'. Good luck finding all those switch statements when you add a new object type.

      --
      No sig today...
    56. Re:When will people learn... by s73v3r · · Score: 1

      I think he means that a good Fortran programmer can write code in the same style and using the same idioms as Fortran in any language, say, Python. While that might make for good Fortran code, it makes for very poor Python code.

      In the same respect, a good C programmer can write code in the same style and using the same idioms as C in C++. While that would likely be very good C code, it is very poor C++ code. Yes, it is possible and it will still compile. However, just because something compiles does not make it a good idea.

    57. Re:When will people learn... by s73v3r · · Score: 2

      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.

    58. Re:When will people learn... by Anonymous Coward · · Score: 0

      You were doing so well, then you threw this gem in:

      OOP is currently being stabbed to death by concurrency & parallelism, and there is nothing anyone can do to save it.

      OOP is a cross-language pattern. *Specific implementations* of OOP may be in the process of being skewered by parallelism, but generally it's shoddy development practices and a lack of knowledge of computer architecture that is to blame, first.

      It's unlikely that OOP will ever die. You still need a way to express the concept of a "matrix", "reservation", "genome_sequence", etc., in the code.

    59. Re:When will people learn... by s73v3r · · Score: 1

      The thing with BigO notation is that, if N is large, it's going to dwarf that constant.

    60. Re:When will people learn... by s73v3r · · Score: 1

      I'm 80% sure that C has a qsort function built into it's standard library.

    61. Re:When will people learn... by s73v3r · · Score: 3, Funny

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

      [Citation Needed]

    62. Re:When will people learn... by s73v3r · · Score: 1

      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.

      This is an incredibly incorrect statement. While the languages might eventually lead to being the same thing, the paths they take to get there can be vastly different. There are huge differences between the expressiveness and strengths of particular languages.

    63. Re:When will people learn... by Anonymous Coward · · Score: 0

      But they don't [lack a garbage collector]. In fact, they both have several available GCs, the most well-known of which is probably the Boehm-Demers-Weiser ("Boehm") GC.

      So, C, like C#, has pointers and garbage collection. Are they "effectively quite similar"? Of course not. And neither are C and C++, for C code and idiomatic C++ code have typically rather distinct look and feel (and structure) due to the multitude of paradigmas available and in use in C++, but not in C.

      Even if they have a non-trivial common subset, as far as language design goes, C and C++ are far more distinct than Java and C#, so grouping the latter would make much more sense.

    64. Re:When will people learn... by brausch · · Score: 1

      I absolutely agree. Things that are part of one language might be in another's standard library. The bottom line is that the computer hardware is still the real deal and everything else is just trying to make the programmer better at solving whatever is the problem being worked on. After 40 years of programming in lots of languages and lots of OSs and lots of hardware ranging from kilobytes to megabytes to gigabytes of RAM, it still comes down to "ALGORITHMS + DATA STRUCTURES = PROGRAMS". The only thing I'd add is that with multiple CPUs and clusters of machines it is now "ALGORITHMS + DATA STRUCTURES + SYNCHRONIZATION = PROGRAMS".

      Bill

      --
      "Almost every wise saying has an opposite one, no less wise, to balance it." - George Santayana
    65. Re:When will people learn... by Black+Parrot · · Score: 1

      What if you have an optimal big O solution, but the constant in front is big? Cutting that constant in 1/4 while still getting the same scaling as working set grows has obvious benefits. You obviously have no experience writing a piece of software where performance matters and good performance is difficult to achieve given your workload and hardware.

      You're wrong about that.

      However, I also have experience writing software where *correctness* matters, and if I trade a but of constant-level efficiency to get robust maintainable code, then I've come out ahead.

      It doesn't do any good to have your program finish in one day instead of four, if the output is wrong.

      --
      Sheesh, evil *and* a jerk. -- Jade
    66. Re:When will people learn... by Black+Parrot · · Score: 1

      Asymptotic complexity is about what happens for inputs that are both worst case and arbitrarily (read: infinitely) large.

      Uh, no. For some algorithms a very small n can be intractable.

      --
      Sheesh, evil *and* a jerk. -- Jade
    67. Re:When will people learn... by Anonymous Coward · · Score: 1

      No, it's not horrible. It's almost always the correct thing to do.

    68. Re:When will people learn... by Anonymous Coward · · Score: 0

      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 ultimately the same thing at the advanced level.

      I suspect that if we were discussing knives you'd be the guy saying that "What people need to realize is a knife is just a sharp thing. In the end you can cut with a flint knife just the same as a bronze one I just may need to hammer a new one every time it breaks instead of being able to sharpen the edge. Not saying it's better just saying at the advanced level it's all the same".

      Programming languages are tools. You use the tool that makes you do the least work to achieve your ends. Saying "The only difference is I have to implement how these features are done in C (or find a library) rather than using language features." is roughly the same as saying "The only difference between a power drill and a hand drill is I have to turn the hand drill myself (or find a lackey)." It's missing the point that by not having to do as much yourself you can spend that effort somewhere else, and that some tasks are sufficiently complex that without the added productivity of the more advanced tools you would not be bale to complete them.

    69. Re:When will people learn... by adonoman · · Score: 1

      C has a qsort in its standard library, so rolling your own bubble sort would be a terrible idea in most every situation. That being said, C++ also has a built in sort algorithm that matches and often significantly outperforms C's qsort implementation thanks to the additional type information that templated functions can use. C's qsort is hamstrung by having to take a void * to the data, and a function pointer to the comparator. A C++ compiler can take the compiled type information and inline the comparator, and run all kinds of other size and type-specific optimizations. You'd be very hard pressed to find a non-templated language that can deal with generic algorithms as quickly as C++ (and any other templated language) can. This doesn't apply to Java's and C#'s generics, since they can't take advantage of the type information in the same way.

    70. Re:When will people learn... by Drethon · · Score: 1

      My perspective is calling yourself an expert of a programming language is foolish. A person can become an expert of an area of programming and find that particular languages work best for them but they need to understand that just because they like one particular language, there are cases where it is better to take what they know in one language and use it in another.

      C/C++ for low level development, JS, PHP and Ruby for webdev (I hear), Perl for regex, C# and python for rapid development. These may be strengths (and I may have some wrong) but there is still overlap where a language can do more than its little slot in life.

      Also if you know how to program real well in PHP you are also capable of writing a program in C/C++ with nothing more than a reference book. It may not be the best program in the world but it will work. The key thing is understanding issues that are universal to all languages, memory leaks (yes this happens in other languages if you abuse it badly enough), floating point mistakes and SQL injection is not an issue in one language but an understanding of programming in itself.

    71. Re:When will people learn... by Darinbob · · Score: 1

      This depends. You can write C-style in C++ and get very very good code. C++ can be a C with better type checking and more enforcing of rules and easier modularization.

      C works because it does not pretend to be anything that it isn't, what you see is what you get. C++ fails because it tries to be too much; it wants to be an OO language while telling everyone to use generics instead; it wants to be a low level efficient language while shoving in expections and RTTI as much as it can; it wants to be a high level language while not having a garbage collector, dynamic binding, or type inference. It fails most when programmers try to do all of that at the same time.

    72. Re:When will people learn... by Darinbob · · Score: 1

      Probably that C-like program that someone thinks is not very good C++ style will run faster and take up less memory than if it were written in the C++ style.

    73. Re:When will people learn... by swan5566 · · Score: 1

      No it isn't. For a complexity of O(n^2), one instance of n = bizillion will take much, much longer than a bizillion instances of n = 1. What you said will only hold true for complexity O(n). And like I said, in the latter case (n = 1, or something small), implementation details can outweigh algorithmic efficiency.

      --
      In debates about Christianity, there are two groups: those looking for answers, and those looking to just ask questions.
    74. Re:When will people learn... by Darinbob · · Score: 1

      You need both. I've seen O(n) codes that were abysmally slow because the implied constant was huge. People still use bubble sort because it is fast in very many cases even though it has O(n^2) performance. There are even versions of quicksort that fall back to bubble sort when the size of a partition falls below a small number. Even then note that quicksort is very highly used and yet does not have optimal O(n log n) performance in worst case.

    75. Re:When will people learn... by Anonymous Coward · · Score: 0

      No, just no.

      Generalizations like this is how we end up with crappy software. Even O(n**3) code is faster than O(n) in some circumstances. And then it sometimes (actually *most* of the time for UI code) does not matter if some piece of code is O(n), O(n**2), O(1), etc. What is wrong is to assume that O is god and nothing else matters.

      With proper optimizations, an algorithm can run 10-100x faster while having the same O performance metric using the same language (C being an example here)

    76. Re:When will people learn... by Darinbob · · Score: 1

      If you have a constant size RAM and CPU register size, then it's all O(1) anyway. Very often "N is large" means bigger than you will practically need in the life of the application. The constants may be so big that N has to be larger than the computer storage can handle.

      Big-Oh notation is theoretical, it is intended to help understand algorithms and not be a measuring device for algorithm performance on actual hardware. Certainly it matters of course. I recently got some quite noticeable improvements in some code by finding that it was doing O(n^2) and changing to O(n). However after that I also got similar noticeable improvements by changing how it did a lot of the operations even though it was still O(n) afterwords.

    77. Re:When will people learn... by david_thornley · · Score: 1

      Except that C++'s sort() will normally be considerably faster than C's qsort(). qsort() has to work through pointers, while sort() can work on the objects themselves. This isn't an OO thing, but rather a template thing.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    78. Re:When will people learn... by Zaphod+The+42nd · · Score: 1

      I never said it was distributive! I merely said that if you're running a single subroutine multiple times, and the subroutine can be simplified to O(1), then the larger algorithm that calls it multiple times becomes the actual problem space, the actual algorithmic complexity. I never insinuated that you could compare multiple different sets of algorithms run different amount of times! That's completely different!

      It sounds like you're worrying about the environment handling all those "instances". That's really more of a space problem, so comparing it to big-O is entirely apples and oranges and is nonsensical. If you want to say that space more than time is a factor in some programs, and may choose taking one over another, then that may be fair, but I feel like you're going to have to get very machine specific. I guess you're against Java and you're concerned that it won't be able to handle your "bizillion" instances versus C, but it'd have to be a pretty special case. Even then, there are solutions in Java...

      --
      GCS/MU/P d- s:- a-- C++++$ UL++ P+ L++ E+ W++ N o K- w--- O M+ V- PS+++ PE Y+ PGP t+ 5- X R++ tv+ b++ DI++ D++ G+ e++ h-
    79. Re:When will people learn... by Zaphod+The+42nd · · Score: 1

      His argument was that minimizing developer time (a feature of high level languages) could in itself lead to more efficient code by using existing versions of algorithms rather than rolling your own, which takes longer. I just wanted to point out that it had nothing to do with high or low level languages, any can use libraries with algorithms that have been vetted, so his point was moot. Yes, some languages have some features over others. That's tangential.

      --
      GCS/MU/P d- s:- a-- C++++$ UL++ P+ L++ E+ W++ N o K- w--- O M+ V- PS+++ PE Y+ PGP t+ 5- X R++ tv+ b++ DI++ D++ G+ e++ h-
    80. Re:When will people learn... by Darinbob · · Score: 1

      The printf also generates far less code when compiled.

    81. Re:When will people learn... by Darinbob · · Score: 1

      C++ can use garbage collection as well. If everything you have is simplistic enough that a stack based memory management with smart pointers will work, then that will work with C too (just need to remember to free). Garbage collection has the advantage in that it's often more efficient as well (malloc/new free/delete can be very expensive operations), and can improve locality of reference.

      On the other hand when doing a lot of embedded systems many people use a style of alloc-on-init only; no need to malloc/free over time.

    82. Re:When will people learn... by Darinbob · · Score: 1

      Because often the "modern" ways are slower. Smart points slow down your pointer access, STL array slows down indexing by checking bounds, etc. Be nice if some of these classes could turn off the safety once you've finished debugging (same way you turn off asserts or precondition checking).

      There's the conflict in C++ between being efficient and low level versus being abstract and high level, and it doesn't quite achieve either gracefully.

    83. Re:When will people learn... by T.E.D. · · Score: 1

      *sigh*

      OOP is not slow. OOP is a design approach. You can use it with C code, and it won't somehow magically slow down your C code.

      Dynamic dispatch is certianly a lot slower than a simple function call, but only a total noob uses dynamic dispatch when it isn't nessecary. DD is still quite competitive with dispatching via a huge switch statement (the situation it is meant to replace), and far less error prone, but if you wouldn't otherwise need to do something like that, you shouldn't be using DD. Static distpatch can be figured out at compile time, and no competent compiler will generate code for it that is slower than a simple function call.

    84. Re:When will people learn... by Anonymous Coward · · Score: 0

      Agree that the bigger problem is when people write in C++ as though it is Java. But your impression of the nature of idiomatic C++ is dated. Excessive use of virtual functions and deep class hierarchies is bad C++. With C++11 there is even more of an emphasis on the use of value semantics and generic algorithms, which provide powerful compile-time abstractions that nearly disappear at run-time. The "data driven approach" is very well supported by modern C++.

    85. Re:When will people learn... by Anonymous Coward · · Score: 0

      Just use too many templates, and you'll get executables on the order of hundreds of megabytes without trying too hard.

      And of course some great compile times.

      Special bonus if you abuse boost to do everything.

    86. Re:When will people learn... by shutdown+-p+now · · Score: 1

      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.

      You don't have to have deep hierarchies. STL and Boost, for the most part, don't.

      You don't have to use virtual for all methods. It's a separate explicit keyword for a reason.

      If you care about template bloat, you can use extern template to hide template bodies, and explicitly instantiate templates for specific types. It still beats macros, or hand-coding different functions for different types, or hacks like void* in qsort (which also does nothing good for perf).

      Still, with C++ you actually have all those choices, while in C you do not. Most importantly, in C++ you can deal with resource cleanup in a sane way, rather than "if (errno) goto error" after every single damn line of code.

    87. Re:When will people learn... by ckaminski · · Score: 1

      Nobody, except the defense industry, gets paid for being fast but completely missing the target (results).

      Accuracy first, then speed. Nearly all the order-of-magnitude speed-ups I've seen have all been related to working with collections (Big-O issues) and lock contention elimination. I suppose you can call those algorithmic rewrites "code efficiency".

    88. Re:When will people learn... by shutdown+-p+now · · Score: 1

      The hoops one has to jump through to provide lambda functionality in C++ is just icing on the cake

      These days the hoop would be finding a C++11 compiler - or at least the one supporting lambdas. To the best of my knowledge, all mainstream C++ compilers have had that support for some time now (e.g. VC++ for two years; g++, if I remember correctly, for about as long).

    89. Re:When will people learn... by shutdown+-p+now · · Score: 1

      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.

      Objective-C (remember that you can't rely on GC if you want portability - it's only there on OS X, not in iOS), and Delphi.

    90. Re:When will people learn... by jgrahn · · Score: 1

      Because

      printf("0x%08xn", x)

      is way more verbose and confusing than

      std::cout std::hex std::setfill('0') std::setw(8) x std::dec std::endl;

      True; setfill, setw et cetera suck. But iostreams output rocks if you use it with user-defined types rather than integers. You want Foo to print as hex with 8 digits? You make its output function format it that way. That way you don't have to repeat that $08x every time you print it. I see that as a subtle hint: the best way to use C++ is to let the types do the work.

      PS. std::endl is not the C++ equivalent of \n. In C++ it's called \n.

    91. Re:When will people learn... by Anonymous Coward · · Score: 0

      Regarding reliability and testing, how do you like the complication C++ features add to testing and debugging?

      Templates,
      keyword virtual (any manifestation),
      operators,
      etc.

      While some C++ features can be emulated in C, the choice is yours whether or not to use them in either language.

      In C and C++, some standards exist for certain industries regarding usage of the C and C++ languages (e.g. MISRA). These do not necessarily address performance, but they do emphasis testability and safety.

    92. Re:When will people learn... by Anonymous Coward · · Score: 0

      ,,, 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.

      Only if you do it wrong. Templates can be used for static polymorphy, thereby actually avoiding the run-time overhead of virtual methods by moving the desicion making to compiling and linking. I'm not quite sure what you expect from virtual dead stripping. Correct me if I'm wrong here, but AFAIK dead stripping relates to removing code at link time that can not be reached, the influence on run-time should be small, at worst you should get a larger executable that may result in worse code caching. Deep hierarchies are a design problem and one can also do C with deep calling hierarchies. I write image processing software in C++, and so far the performance hot spots are usually related to number crunching, sometimes to too much copying of data bacause of bad design desicions, but never to OO or template related overhead.

    93. Re:When will people learn... by Anonymous Coward · · Score: 0

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

      OOP is currently being stabbed to death by concurrency & parallelism, and there is nothing anyone can do to save it.

      It's all about how you model your solution. You cannot ignore the constraints and requirements the software has to face like: SMP, throughput, hardware, etc.
      e.g.: for an FFT-computing machine a 'class Double {double val;...}' will be an overkill, and for SMP applications 'Class FFT {
      void compute() {
      global_sem.take();
      *** compute fft here ***
      global_sem.release();
      }' will kill performance.

      Oh, and BTW: Let those kiddies play with PHP. They'll turn to us (me?) when they need real work done in C/C++ and assembly too.

    94. Re:When will people learn... by loufoque · · Score: 1

      If that function really needed to be virtual, it's a lot better than sticking a switch statement into EVERY for loop that uses it,

      You could make a switch statement in a generic function that takes a function object and calls it. It would essentially be the same in terms of usage except that it would be faster, but also allow more, such as generic visitation or easier multiple dispatch.

    95. Re:When will people learn... by loufoque · · Score: 1

      C++ can actually greatly help in making a SIMD abstraction layer. Surely you don't want to write all versions of your code for SSE, SSE2, SSE3, SSSE3, SSE4a, SSE4.1, SSE4.2, AVX, XOP, FMA, AVX2, LRBni, NEON, Altivec, VMX128 and VSX.

      You can also use meta-programming techniques to automatically perform arrays-of-structures to structures-of-arrays conversion or to make code independent of the cardinal size.

    96. Re:When will people learn... by Anonymous Coward · · Score: 0

      > OTOH C++ is good at the big-picture stuff. C isn't
      Tell that to the Linux kernel developers...

    97. Re:When will people learn... by UnknownSoldier · · Score: 1

      Start here young grasshopper...

      Mike Acton's "Typical C++ Bullshit"
      http://macton.smugmug.com/gallery/8936708_T6zQX/1/593426709_ZX4pZ#!i=593426709&k=ZX4pZ

      OOP, while a great paradigm, is NOT a silver bullet for every problem. Unfortunately far too many programmers view OOP as the only way to solve a problem in C++. "When all you have is a hammer ... every problem starts to look like a nail."

    98. Re:When will people learn... by Anonymous Coward · · Score: 0

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

      Correct. But only if you're dealing with datasets with thousands or millions of records at least. If what matters is hitting or missing a deadline (so that you can have 30 instead of 15 FPS) then code efficiency is everything.

      Have you ever considered how is it possible that O(N^2) code can be faster than O(1) code? Well, it can given the right constants and value of N.

    99. Re:When will people learn... by UnknownSoldier · · Score: 1

      > unless you further qualify this by saying "console games" or possibly 'box retail games".
      Correct. Professional games was implied. i.e. Win32 / Xbox360 / PS3 / etc.

      > I would also argue that the component/data driven design of many games and game engines primary goal is flexibility and extensibility, with a huge side benefit being the possible memory and performance benefits.
      Yup! For games a data-driven approach has many nice wins and benefits. Thanks for the enunciation of the finer points. =)

    100. Re:When will people learn... by UnknownSoldier · · Score: 1

      > If you want performance, you don't use C you use C++ template metaprogramming.

      Having worked with hundreds of professional PS3 developers (who were also doing Xbox 360 dev) my experiences says you are wrong. You are forgetting the most important aspect: the cache

      Typically compiling code at -Os is often faster then -O3 because SMALLER code tends to be FASTER code because you are not blowing the I$ cache as much. I should point out this is less of an issue on x86 chips.

    101. Re:When will people learn... by robthebloke · · Score: 1

      I see. So a library that declare a vector3 as 3 floats is good is it? A library that advocates using a vector4 instead of a vector3, thereby increasing memory usage by 33%, whilst ensuring cache misses become more frequent, is good is it? A library that performs well in artificial benchmarks by making everything inline, but performs terribly in real world usage due to appalling instruction cache usage, is good is it?

    102. Re:When will people learn... by robthebloke · · Score: 1

      Been there, done that, but the junior devs ignore them. (ok, ignore is probably the wrong word. They still prefer to think in terms of nice simple objects, rather than batches of similar data).

    103. Re:When will people learn... by robthebloke · · Score: 1

      My bet, is that OpenCL is the only way forwards.

    104. Re:When will people learn... by robthebloke · · Score: 1

      It's unlikely that OOP will ever die.

      I do rather hope it will. COP (container oriented programming) is a more accurate reflection on what you should be doing.....

    105. Re:When will people learn... by robthebloke · · Score: 1

      Parallelism and especially concurrency is notoriously hard to do correctly and verify.

      Me thinks you might be a C++ programmer. I'd like to show you a better approach:

      float add(float a, float b)
      {
      return a + b;
      }

      Now, what's so hard about that? Shading languages don't have these problems, so why are we putting up with them in C++? Job security? :p

    106. Re:When will people learn... by Anonymous Coward · · Score: 0

      That template bloat is just bullshit is a response to straw man... The template bloat issue comes about when equivalent redundant code is generated that is not eliminated either by the compiler or the linker... not this stupid wrong example given by some fuckwit on the Mozilla team 7 or so years ago (yeah, those guys should know all about efficiency :rolls-eyes:)...

      Ironically in 2005 gcc and ld were absolute garbage with respect to removal of redundant code across multiple translation units. The situation has gotten better. On the otherhand, because TYPES are the key for everything in C++ (Everything is a type), there are still numerous cases where template parameterized code generates exactly the same code and it is not eliminated by the linker. That blog post is bullshit. Do a real example.

    107. Re:When will people learn... by tibit · · Score: 1

      Umm, yes, a vector3 are three floats, what else would you want to put in there? C++ does type deletion so there's no overhead for a vector3 foo vs float foo[3]. Where did you get that eigen "advocates using a vector4 instead of vector3"? And do you have any results that show that optimizing for lowest possible cache misses, at all costs (you implied that, not me), leads to optimal performance? Code using eigen compiles to quite decent assembly; I dare you to show how it "performs terribly in real world usage due to appalling instruction cache usage". Are you actually using it, or just whining? They coax a C++ compiler into generating vectorized code, you won't get better performance by "simply" writing it in C (unless your C compiler is good at vectorization, and you're good at writing for that compiler).

      --
      A successful API design takes a mixture of software design and pedagogy.
    108. Re:When will people learn... by tibit · · Score: 1

      That's a relatively newfangled thing, you know. There's tons of fairly recent code that couldn't use C++11, and said code, if pragmatically done, would use function objects for the price of source bloat and poor readability of the source code.

      --
      A successful API design takes a mixture of software design and pedagogy.
    109. Re:When will people learn... by shutdown+-p+now · · Score: 1

      Yes, I know. But I would argue that one of the reasons why C++ is trending up again is precisely because C++11 has brought a lot of goodness that finally lets you write code as God (and Stepanov) intended all along.

      I guess I'm lucky being in a position where I start using newly implemented features in a C++ compiler before that compiler is even released (there were plenty of lambdas in the source for VS2010, for example). After being there for a while, I really don't want to go back to C++03 - while some gaping holes that had can be tolerably filled with Boost surrogates, that still leaves plenty.

    110. Re:When will people learn... by Anonymous Coward · · Score: 0

      Non-sequitur. How is a "junior coder" sticking a virtual function call inside a for loop different from John Carmack doing the same fucking thing?

    111. Re:When will people learn... by Anonymous Coward · · Score: 0

      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

      if there is a difference between calling a cache pointer inside the loop and the code generated by the compiler, this is compiler failure, unless it was not was that programmer meant in the most readable way possible given the performance constraint.

    112. Re:When will people learn... by tibit · · Score: 1

      Unless someone does the legwork of setting up project files needed to recompile C/C++ runtime library on VS11 (and fix it to work on XP), many people will be stuck with VS2010 as they have to target XP. I'm on VS2008, and I don't know yet if it's worth upgrading to 2010; I'd much rather go to VS11.

      --
      A successful API design takes a mixture of software design and pedagogy.
    113. Re:When will people learn... by shutdown+-p+now · · Score: 1

      someone does the legwork of setting up project files needed to recompile C/C++ runtime library on VS11

      I'm not sure what you mean by that; why would you recompile the runtime library?

      many people will be stuck with VS2010

      But VS2010 already had a bunch of tasty C++11 stuff (and specifically lambdas!).

    114. Re:When will people learn... by WaywardGeek · · Score: 1

      Yes, your points are correct. What kills me is that we have no fundamental reason why our super-fast languages can't also be the ones that we call "rapid prototyping" languages. The speed of C sucks. I know that the youngsters here on slashdot don't want to hear that, but C's memory layout completely fails to take into account modern memory architecture. C was, after all, designed in the '60s. Worse, C (and C++) make that layout visible to programs, meaning that C compiler wonks aren't allowed to fix that layout for you. Randomly mallocing objects around the heap is brain-dead stupid if you care about speed. If you're slightly less than brain-dead, you might implement a buddy-system allocator, which sounds great so long as you are ignorant of cache architecture. C++ is worse, and Java doesn't even give low level hackers like me the opportunity to give standard libraries a big fat finger and implement my own memory layout.

      There's little reason that a high level language similar to Python couldn't be considerably faster than C. What pisses me off is that we geniuses here on Slashdot have mostly lost sight of the real speed bottlenecks. You have to get a freaking logic analyzer and paste it onto the memory interface to see what's really going on. I remember doing exactly that on a PN-10 Spectrum CPU on the Cupertino campus of HP (which is being bought by Apple) in 1989 when the building started to shake. I was so involved in my logic analyzer output that I chased the mini-computer I was debugging around the server room floor during the earthquake without realizing what was going on. It was on wheels that someone forgot to lock down. It eventually found a space where a floor tile was missing and fell over. That's when I came out of my tech comma and realized the world was shaking.

      So, with a but of understanding about how modern computers actually work, we could build something faster than C, and hopefully quite close to as productive as Python. It kills me that we geeks have given up on such an ideal and bicker about focusing the big O or whether that N constant counts. Let's get real and fix it.

      --
      Celebrate failure, and then learn from it - Nolan Bushnell
    115. Re:When will people learn... by tibit · · Score: 1

      I'm not sure what you mean by that; why would you recompile the runtime library?

      VS11's C runtime is crippled not to run on anything below Vista SP2. They even crippled the linker to prevent marking the executable's subsystem version as compatible with XP, but at least it can be worked around by using editbin from a custom build step. Those are entirely arbitrary decisions with no technical reason other than forced abandonment of XP as a target for development.

      But VS2010 already had a bunch of tasty C++11 stuff (and specifically lambdas!).

      Sure. But if I'll spend the money, I might as well buy the newest version, why buy something that'll be a version behind as soon as VS11 hits RTM? It's time I moved to Windows 7 as my main virtual machine, that's not a problem, but I'll need to build for XP for at least 4-5 years.

      --
      A successful API design takes a mixture of software design and pedagogy.
    116. Re:When will people learn... by Anonymous Coward · · Score: 0

      That's not true. Writing multicore-friendly server code in C++ is what I do all day. Being careful with cache lines and cross-CPU memory accesses has nothing to do with C versus C++.

    117. Re:When will people learn... by Anonymous Coward · · Score: 0

      C codes perform the calculations and is part of the procedural body within C++. So, C++ is a super set of object oriented C++.

    118. Re:When will people learn... by Anonymous Coward · · Score: 0

      Almost all Windows AAA games are written in C++.

      Which is why when they're ported to consoles, the performance initially sucks ass and runs out of memory. Bethesda still seems to suffer from this after all those years.

    119. Re:When will people learn... by ohnocitizen · · Score: 1

      sticking a virtual function call inside a for loop because he doesn't the three levels of pointers being applied

      Did he accidentally the whole for loop?

    120. Re:When will people learn... by Stiletto · · Score: 1

      I wouldn't say C "forces one to think about" anything, besides always wondering exactly how big you made that array that you're about to iterate through....

      It's funny.. Whenever people criticize C++ with some nebulous claim of "poor performance", they always cite some specific poor usage of the language, or programmers who don't know what they are doing.

      I could paint C as a language fraught with crashes and C programmers as idiots, by showing examples of buffer over-runs and null-pointer dereferencing, but it would be equally dishonest.

    121. Re:When will people learn... by Wildclaw · · Score: 1

      This doesn't apply to Java's and C#'s generics, since they can't take advantage of the type information in the same way.

      C# generics allows for full performance optimization as the CLR virtual machine code supports generic types.

    122. Re:When will people learn... by c++0xFF · · Score: 1

      I think you're misunderstanding the relationship between C and C++. Backwards compatibility has nothing to do with it. On the other hand, most people go the other way and assume that C++ is C with a bunch of features bolted on, but that's not true either.

      Nothing about C++ in itself is slow compared to C ... it's not like going to Java where you have to consider the effects of garbage collection, running in a VM, etc. However, individual features (exception handling being a good example) have a very specific performance/ease of use trade off that a developer must consider before using this feature.

      So, here's how it really works: you write your code in C++. Then you find the bottlenecks. And those you write specific libraries in C++ to optimize. Why still in C++? Because switching to C does absolutely nothing magical to make your code faster. (Now, if we were talking Java and writing a C library, you might have a point, but that's not the case here).

      Why kind of bottlenecks are we talking about? Well, what's relevant to this discussion is overhead incurred by using exceptions, or maybe virtual functions and polymorphism is killing your performance. (Algorithmic complexity is not generally fixed by switching languages.) Well, the solution here is to not use those features. That's it. One of the key tenets of C++ is that a feature only introduces overhead if you actually use it! Anybody who says that C++ is slower than C is simply wrong.

      Once I fully grokked that one concept, only then did I understand the true nature and power of C++.

      One thing that you might not have considered, though, is that some C++ features can actually improve performance over C code. Used correctly, exceptions and templates can be very powerful tools for writing fast code very easily. Used incorrectly, however ....

      Now, that all said, I still mostly agree with your comments about scripting languages. Get things to run right first, in VBA if need be, and then make the key parts faster. And your last line is very true as well: C++ and C are very different languages in the end. Writing C code in C++ is generally a sign that you're not using the language to its fullest extent.

    123. Re:When will people learn... by c++0xFF · · Score: 1

      No, the problem is when you write C++ code as though it were Java. Seriously. "Nicely encapsulated objects" is certainly one way to write C++ code (and is the one usually taught by the books), but that isn't by any means the definition of good C++. What you're describing, however, is Java code, where there really isn't any other way to do things.

      The C++ philosophy is not OOP. It's not templates. It's not exceptions. Those are simply tools provided in the language, and you can use them how you will. And if you have a 256bit wide SIMD registers, many of those tools are inappropriate. Good C++ code, then, will look completely different.

    124. Re:When will people learn... by ADRA · · Score: 1

      Don't forget the real reason dev's support higher level scripting languages like LUA. If they needed to hire trained competent C developers to do the same piece of work that a LUA dev can do, it would cost a hell of a lot more to write games (both in raw dollar value per hour, and in the time wasted 'leading with the crap' that isn't important in C). And like you said, if there was some really problem areas that the script was bottlenecking on painfully, i'm sure that single function could get dragged into a native mapping.

      Hell now adays, a ton of projects just leverage the engines from other companies (or teams), slap on some game specific native extensions, spend 15% of the budget on higher level scripting/graphics/sound/voice/etc.. and the other 85% on marketing =)

      --
      Bye!
    125. Re:When will people learn... by ADRA · · Score: 1

      There are common sets of Java idioms now bult into the language that makes concurrency and multithreading dead simple (for those that have a clue), but you still need to know where and how your program is supposed to function in a multi-threaded setup (which can be hard for any non-trivial orchestration). Common shared data integrity (volatile, static fields, ThreadLocal, etc..), locked collections (synchronized loop iteration), race conditions, circular lock contention, etc.. all still happen in Java if you aren't careful, so knowledge of proper practices and debugging becomes invaluable regardless of what language you're married to. The one exception may be purely functional languages where side-effects basically don't happen, but I find them very impractical for large scale real world applications ouside of a few (mostly academic) use cases.

      --
      Bye!
    126. Re:When will people learn... by Joce640k · · Score: 1

      (just need to remember to free).

      The point is: With C++ you don't have to remember. The compiler does it for you (and it never gets distracted or has a bad day...)

      Stack unwinding is way more useful than that though, it allows things like exceptions.

      Unexpected end of file when you're six levels deep? No problem in C++ - throw an exception and everything is cleaned up automatically. In C you have write code where every function returns an error code and you have to be religious about checking them and cleaning up properly.

      This sort of code is MUCH easier and more robust in C++ than in C.

      --
      No sig today...
    127. Re:When will people learn... by Anonymous Coward · · Score: 0

      THAT is your experience with parallelism and concurrency?? Trivial parallelism problems that fit nicely into a domain-specific paradigm? No wonder you spout nonsense about the relationship between OOP and parallelism and concurrency. Solving embarrasingly parallel problems[1] does not impress me much. Do you know what problems like deadlocks, livelocks, starvation and race conditions are? Do you know why so many different models and mechanisms (mutexes, monitors, semaphores, actors, STM, ...) have been invented to handle the challenges? Do you understand why so much time and energy has been put into making so many languages[2] simply just to handle this prloblem? If you think concurrency is easy, you don't understand concurrency.

      Oh, and for the record, I only dabble in C++, I much prefer Scala when appropriate for the context (though I do admit that Scala is far from appropriate in all contexts out there).

      [1]: http://en.wikipedia.org/wiki/Embarrassingly_parallel
      [2]: http://en.wikipedia.org/wiki/Concurrent_programming#Concurrent_programming_languages

    128. Re:When will people learn... by Hentes · · Score: 1

      I was answering to the claim that OOP is dying because of paralellisation, making the argument that Java does concurrency fine while being a strictly OOP language. Of course, most of the usual problems of multithreading also exist in it, and garbage collection adds another set of things you need to be aware of, but it's still an improvement. But yeah, no language will write the program instead of you if you lack the skills.

    129. Re:When will people learn... by Anonymous Coward · · Score: 0

      > and Java doesn't even give low level hackers like me the opportunity to give standard libraries a big fat finger and implement my own memory layout.

      On the bright side, not making any guarantees about memory layout allows the java compiler and the virtual machine to make optimizations that a C/C++ compiler cannot make.

    130. Re:When will people learn... by Raenex · · Score: 1

      Another interesting fact about low-level languages is that it is much more difficult for bugs to hide. Writing correct code is nearly the same as writing understandable code.

      That's nonsense, not a "fact". Even readable code can have a simple off-by-one error that results in memory corruption that can be hard to track down.

      The only things that can go wrong (huge functions, tons of global variables, etc.) could just as well go wrong in a higher level language.

      Do you actually code in C or C++? There are *many* places in these languages where "things go wrong" that they don't in higher level languages.

    131. Re:When will people learn... by Darinbob · · Score: 1

      That's my point about stack based memory management. The one's I've seen are either stack based (ie, automatically free when leaving scope, may as well use alloca()) or they're reference counted (a buggy and naive version of GC). And GC does more than just freeing stuff for you.

      Exception handling is nice, but it's a bit expensive; granted C++ compilers have been getting better at this I admit. However I've seen programmers use exceptions badly and generating even more code than the manual error handling, or else just using them as panic buttons instead of actually dealing with the exceptional conditions (ie, not retrying operations). I almost never see anyone use them for something other than error checking.

      I know C++, I've been using it since 1984. So I've heard all of the platitudes.

    132. Re:When will people learn... by Raenex · · Score: 1

      Uh, no, yourself. First you ignored the meat of his post, which thoroughly demolished your original post. Second, what he said was correct: the asymptotic complexity is defined by how the algorithm behaves as n goes to infinity. Technically, it doesn't matter whether n is small or large.

      An algorithm can be impractically inefficient to the point of "intractable" and still have a better asymptotic complexity than a more practical one. That's the problem with over-relying on big-O behavior.

    133. Re:When will people learn... by Anonymous Coward · · Score: 0

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

      Only "sort of a bit higher level" languages. Real high level languages can minimise run time correctly and a lot more efficiently than a human coder by applying difficult high level optimisations.

    134. Re:When will people learn... by Anonymous Coward · · Score: 0

      ..and we wonder why, even after taking increased size and complexity of graphic assets into account, a simple deathmatch game written today requires an order of magnitude or more cpu power to get the same ticrate as a game written 10 years ago in C.

    135. Re:When will people learn... by WaywardGeek · · Score: 1

      So true! It makes my head hurt a bit, but real-time measurements of what data is accessed in what loops could be used to seriously optimize memory layout. If you're hammering a red-black tree, just pull out those to left/right pointers and the color, and put them in an array as objects by themselves. Cache hit rates increase by several times. On my last signal-processing Java app (speeding up speech - libsonic in Debian), Java ran only 5% slower than C. I was impressed. Of course, I wasn't hammering memory, but if I were, and we had some serious Java innovation in memory layout, Java could easily beat C.

      This is why I claim we could build programming languages that are faster than C, yet productive like Python (though I find Java similar in productivity, if a bit verbose).

      --
      Celebrate failure, and then learn from it - Nolan Bushnell
    136. Re:When will people learn... by Anonymous Coward · · Score: 0

      "There Is No Such Thing As A Free Lunch"

      s/Is/Ain\'t/
      The phrase is TANSTAAFL.

  5. Good news! by 19thNervousBreakdown · · Score: 2

    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.

    --
    <xml><I><am><so><damn>Web 2.0</damn></so></am></I></xml>
    1. Re:Good news! by goombah99 · · Score: 5, Funny

      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.

      --
      Some drink at the fountain of knowledge. Others just gargle.
    2. Re:Good news! by Hentes · · Score: 2

      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.

    3. Re:Good news! by Desler · · Score: 3, Interesting

      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.

    4. Re:Good news! by spatley · · Score: 4, Funny

      ...since you can get ten times as much done in a single line of perl.

      Yes and you will be the only human on earth that knows what it does.

    5. Re:Good news! by zero.kalvin · · Score: 2

      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.

    6. Re:Good news! by Drethon · · Score: 1

      Which purposes do you find it inefficient for? Admittedly I do develop for a lot of high performance and low level type applications so high level languages don't work so well for me.

    7. Re:Good news! by Bigby · · Score: 1

      I think the context of "inefficient" was about its runtime performance, but the development time for certain applications. Like writing your own CGI class to handle HTTP requests instead of just using JEE for a web site. Or web service development. Or making snazzy UIs like with Flash.

    8. Re:Good news! by Anonymous Coward · · Score: 0

      ...since you can get ten times as much done in a single line of perl.

      Yes and you will be the only human on earth that knows what it does.

      Not necessarily...

    9. Re:Good news! by Robert+Zenz · · Score: 3, Funny

      That's called "increasing job security".

    10. Re:Good news! by chuckinator · · Score: 1

      But you can only get that efficiency the first time you write that line of perl. The poor schmuck that comes after you then has to spend ten times as long maintaining it by trying to figure out your obfuscated perl contest submission.

    11. Re:Good news! by Black+Parrot · · Score: 4, Funny

      ...since you can get ten times as much done in a single line of perl.

      Yes and you will be the only human on earth that knows what it does.

      That's why we call it a "write-only" programming language.

      --
      Sheesh, evil *and* a jerk. -- Jade
    12. Re:Good news! by Drethon · · Score: 1

      I can agree with that, I considered C++ for a web game back end and decided that was a bad idea.

    13. Re:Good news! by TheRaven64 · · Score: 1

      Which is only a problem if the code needs to run more than once. There's a reason Perl is (was?) popular with system administrators: you can quickly write single-use code in it. It doesn't matter that the code is totally unmaintainable, because most of the time you won't even save it, let alone try to modify it later.

      --
      I am TheRaven on Soylent News
    14. Re:Good news! by Mike · · Score: 1

      What utter nonsense.

    15. Re:Good news! by Desler · · Score: 1

      Why would you write your own when there are plenty of C++ libraries that will do it for you? This is a really dumb critique of C++ but is constantly trotted out by ignorant people. You really think no one has written libraries for C++ to handle HTTP requests? Really?

    16. Re:Good news! by gman003 · · Score: 1

      I think you're making the rather large assumption that you will know what your own code does.

    17. Re:Good news! by Zaphod+The+42nd · · Score: 1

      Somebody mod parent up :) I lol'd hard

      --
      GCS/MU/P d- s:- a-- C++++$ UL++ P+ L++ E+ W++ N o K- w--- O M+ V- PS+++ PE Y+ PGP t+ 5- X R++ tv+ b++ DI++ D++ G+ e++ h-
    18. Re:Good news! by s73v3r · · Score: 1

      I do agree. However, I would also have to question whether C++ would be the right tool for doing web development, even with using these libraries.

    19. Re:Good news! by Desler · · Score: 1

      Why wouldn't it be? The only reasons I see against it can be chalked up to ignorance and knowledge of C++ and it's available libraries that are either intentionally misleading or decades out-of-date. The state of C++ has moved on well past that of the mid 90s where most people's knowledge of the language seems stuck in. There are also enterprise frameworks for C++ to do web development in.

    20. Re:Good news! by Anonymous Coward · · Score: 0

      Yes and after six months, you won't either. Six years and god won't have any idea either.

    21. Re:Good news! by sysrammer · · Score: 1

      If it was hard to write, it should be hard to read.

      --
      His ignorance covered the whole earth like a blanket, and there was hardly a hole in it anywhere. - Mark Twain
  6. Java dropped by the same amount by TaoPhoenix · · Score: 3, Interesting

    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.

    --
    My first Journal Entry ever, in 8 years! http://slashdot.org/journal/365947/aphelion-scifi-fantasy-horror-poetry-webzine
    1. Re:Java dropped by the same amount by plopez · · Score: 1

      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.

      --
      putting the 'B' in LGBTQ+
    2. Re:Java dropped by the same amount by Theophany · · Score: 4, Insightful

      Probably has something to do with it's buzz being 'underground' and its benefits being widely refuted?

    3. Re:Java dropped by the same amount by Anonymous Coward · · Score: 0

      The data in summary is from 2008.

    4. Re:Java dropped by the same amount by capnchicken · · Score: 2

      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

      --
      A libertarian shat on my carpet once. Claimed the free market would sort it out. -Ford Prefect(8777)
    5. Re:Java dropped by the same amount by cjcela · · Score: 4, Insightful

      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.

    6. Re:Java dropped by the same amount by marcosdumay · · Score: 1

      Python has 3.7%, and C# 7.3%. Python is not ahead. C and Java have nearly the same amount. It is a tie, not a victory for C.

      What is interesting is that I'd expect C# to get marketshare from Java and VB, but it got share fom Perl, Python, PHP and VB. Ok, maybe it didn't got its share directly from those, but at the overall picture it did. What that means is that if it took share from Java, then Java (or C/C++) took some share from those languages. I expected the exact oposite.

      It would be very interesting to know what role QT plays on that change.

    7. Re:Java dropped by the same amount by Hyperhaplo · · Score: 1

      Yes.
      Even now Oracle is being discussed at work and Java is seen as a risk.. which is sad as quite a lot of enterprise front end code is now Java.

      Good perhaps because if we had to switch today Perl is the strongest contender for its replacement.

      Go Perl! :-)

      --
      You have a sick, twisted mind. Please subscribe me to your newsletter.
    8. Re:Java dropped by the same amount by Bigby · · Score: 4, Insightful

      It isn't just Oracle. IBM is more heavily invested in Java than the owner themselves. Google too. Between those 3, you can't possibly avoid Java or think that it will continue to drop in the Enterprise space. Just not going to happen.

    9. Re:Java dropped by the same amount by sourcerror · · Score: 1

      That's total FUD, openjdk is included in most distros.

    10. Re:Java dropped by the same amount by Billly+Gates · · Score: 1

      Not fud at all. If Oracle wins and its ruled that a clean room seperate implementation that just *looks like java* is copy rightable then Oracle will own IcedTea.

      Oracle would well be within its power afterwards to cancel free java then require an expensive Oracle database license for icedtea use for your emoloyer. Scary stuff!

    11. Re:Java dropped by the same amount by RightSaidFred99 · · Score: 1

      Look at the source. This data is meaningless. If you have 500 system admins writing Bash scripts to automate little things, but 10 Java developers writing huge enterprise apps that run the business, Bash would show up ahead of Java.

      It's not very meaningful.

    12. Re:Java dropped by the same amount by RightSaidFred99 · · Score: 1

      C#, Java, C++ are real languages. You don't suddenly decide "hey, let's go 10 steps backwards and port this massive enterprise application to Python from Java or C#". You won't see much cross pollination between scripting languages and real software development languages.

    13. Re:Java dropped by the same amount by Bill_the_Engineer · · Score: 1

      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.

      Actually it's Ruby on Rails that was the hype machine. The spikes in the graph seem to correlate to with Rails popularity. Ruby the language enjoyed an upsurge in popularity from its association with Rails. Despite RoR no longer being the new kid on the block, ruby the language is holding its own.

      --
      These comments are my own and do not necessarily reflect the views or opinions of my employer or colleagues...
    14. Re:Java dropped by the same amount by Anonymous Coward · · Score: 0

      That is surprising, though I guess it makes a certain amount of sense. Python gets used for Web and desktop mostly outside of windows. C# gets used for windows desktop and Web. Ruby gets used for Web exclusively, and only on nonMS platforms.

      Says nothing about a persons preferences for any of them, of course.

    15. Re:Java dropped by the same amount by kraut · · Score: 1

      C#, Java, C++ are real languages. You don't suddenly decide "hey, let's go 10 steps backwards and port this massive enterprise application to Python from Java or C#". You won't see much cross pollination between scripting languages and real software development languages.

      Python is very much a real language.

      --
      no taxation without representation!
    16. Re:Java dropped by the same amount by sourcerror · · Score: 1

      That's not how patent law works. Also, openjdk and other implementations that implement the full Java specification are exempted from the patents. (JIT and VM patents) Sun declared that when they opensourced Java, and Oracle can't change it back.

    17. Re:Java dropped by the same amount by s73v3r · · Score: 1

      IF that happens, then you might be right. However, I wouldn't be willing to take that bet.

    18. Re:Java dropped by the same amount by s73v3r · · Score: 1

      Go fuck yourself with your overly macho "Real Languages" bullshit. There's no such thing. There are languages that are better suited to enterprise development. Then there are languages that are better suited to scripting tasks and web authoring. Neither case makes a language any more "real" than the other.

    19. Re:Java dropped by the same amount by Billly+Gates · · Score: 1

      Go read the news about it?

      Oracle is claiming they own the api and language as a copyright not patent. So in essence you can't call javax.swing.bloatware() without Oracle claiming ownership.

      The jury is ignornant and probably does not understand patent vs copyright law. Either way it is a liability and a scary one as well.

    20. Re:Java dropped by the same amount by Greyfox · · Score: 1

      It would be pretty funny if the next Android developer kit was all written using "Go", though. I can imagine Google completely reversing course on an entire product line just to give Ellison the finger. It's not like they couldn't drop a couple of billion dollars to make it happen. I think they'd find that much in the couches in the employee lounge.

      --

      I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    21. Re:Java dropped by the same amount by Billly+Gates · · Score: 1

      The case is now about copyright as Oracle claims they own the language and any call that looks like theres to the ignorant jury. So Google is saying no we do not call it Java, we call it Andriod. Oracle is claiming look at the source code! We own the syntax how can it not be the same if we own the language and the api calls that came with our version first.

      It has never been tried in court before. SCO never even with that far. Infact, SCO would have fresh new ammo as they can quote this case. That would be scary indeed as Microsoft owns C/C++ now and could claim ownership of GNU GCC.

    22. Re:Java dropped by the same amount by sourcerror · · Score: 1

      You can't copyright or patent a programming languges or an API, your making up shit. You can call your implementation of the Java language Java if you comply with the specification.

    23. Re:Java dropped by the same amount by sapgau · · Score: 1

      IF that happens then Mono will be claimed as Microsoft's property or be sued for license fees.

    24. Re:Java dropped by the same amount by sapgau · · Score: 1

      So Facebook, Yahoo, et.al. using PHP must be insanity.

    25. Re:Java dropped by the same amount by sapgau · · Score: 1

      The real discussion will be why use Oracle databases to begin with.

    26. Re:Java dropped by the same amount by sapgau · · Score: 1

      Why wouldn't that argument apply to C#? Microsoft is known to milk their licensees when it has them in a corner. And Microsoft is definitely not suing-shy.
      Mono project is always dependent on what Microsoft feels of breaking their promises or not.

    27. Re:Java dropped by the same amount by Anonymous Coward · · Score: 0

      Pedantic, but true.

      RoR was the hype machine. However, I contend that Ruby would be nowhere without Rails, and Rails dragged Ruby along on the hype ride, since when people say Ruby, 9 times out of 10 they still mean RoR.

    28. Re:Java dropped by the same amount by shutdown+-p+now · · Score: 1

      Instead of being surprised, look at the methodology of this index. The numbers are pretty much meaningless, which is already obvious to anyone who knows the rough distribution of jobs in the market just from looking at the top 10. It might capture the individual popularity trends more or less correctly, but definitely not positions of languages relative to each other.

    29. Re:Java dropped by the same amount by jmorris42 · · Score: 1

      > You can't copyright or patent a programming languges or an API, your making up shit.

      Wish he were. That is indeed the current line of attack in the Oracle vs. Google lawfare. Common sense says they can't do that but law != common sense and hasn't for decades, too much progressive thought codified in precedent including the obsession with precedent over the original written laws.

      --
      Democrat delenda est
    30. Re:Java dropped by the same amount by ADRA · · Score: 1

      "You can call your implementation of the Java language Java if you comply with the specification."
      And get it tested with the TCK, which was the original cluster F*CK with Apache and the JCP to begin with, because they would only allow the software to be tested if they signed field of use restrictions which Apache wasn't/couldn't abide by.

      --
      Bye!
    31. Re:Java dropped by the same amount by Hyperhaplo · · Score: 1

      It's a good question. We used to only have one - and that was for a COTS product.

      The CMDB software I'd love to have only supports Oracle.

      Lots of other COTS software only supports SQL Server, or SQL Server / Oracle.

      Our primary DBMS is DB2. Midrange and mainframe. We have DA's DBA's and vendor support for DB2.

      Oracle is .. muscling in through the back door. First it is COTS products. Then it is 'why don't we use Oracle for primary business'. Going to be hard getting us off of DB2 though.. 90% of processing is still mainframe based and most of that is batch.

      The biggest reason we don't have many Oracle servers and why we had a project to shut the existing ones down was due to the licence cost. SQL Server may not be as good but it is quite a lot cheaper.

      May the future of your company be tranquil, stress free and Oracle free..

      --
      You have a sick, twisted mind. Please subscribe me to your newsletter.
    32. Re:Java dropped by the same amount by Raenex · · Score: 1

      They'd have to convince all their industry partners, too, and deal with all the existing applications already written for Android. Worst comes to worst, they're going to pay Oracle a whopping fine and negotiate a license.

  7. C is ignored by almost every developer by Anonymous Coward · · Score: 0
    1. Re:C is ignored by almost every developer by RightSaidFred99 · · Score: 1

      C is ignored by almost every developer because the problems for which it is an optimal solution is shrinking. It's great for performance sensitive applications, cross platform applications, low level applications, etc... Many (most) business applications do not fall under those categories.

      In other words, bloat and inefficiency are meaningless a lot of the time, and supportability, feature set, and time to delivery are more important.

    2. Re:C is ignored by almost every developer by Tablizer · · Score: 1

      Machine performance is not usually the bottleneck in the domain of custom business applications.

      C/C++ doesn't quite provide the same level of type-safety protection that compiled biz-oriented languages do; and also doesn't have the concise syntax and quick-to-run nature that "scripting" languages do.

  8. PHP at #4 by TheNinjaroach · · Score: 2

    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.

    --
    I went to eat some animal crackers and the box said, "Do not eat if seal is broken." I opened the box and sure enough..
    1. Re:PHP at #4 by Anonymous Coward · · Score: 0

      Excepting that VB's legacy doesn't encompass the .NET stack at all, at least until version 7 released in 2002. Everything prior is OLE/COM with a custom framework and VBA in Office is still based on that old model as well. VB.NET represents a relatively small market share within the .NET ecosystem, although likely solidly second place.

    2. Re:PHP at #4 by BasilBrush · · Score: 1

      That was in 2008.

      PHP is now at #6 and less popular than C#.

    3. Re:PHP at #4 by Anonymous Coward · · Score: 0

      PHP serves an entirely different purpose than C# and VB. It's strictly web programming and largely through frameworks. C# and VB are general purpose business application languages.

  9. Opinion by degeneratemonkey · · Score: 4, Interesting

    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? ;)

    1. Re:Opinion by degeneratemonkey · · Score: 1

      Addendum: Every engineer worth his weight in salt should be able to write Lisp/Scheme code as well.

    2. Re:Opinion by Drethon · · Score: 1

      I think C/C++ languages will always be around when you want to know exactly what is happening with your memory. I'll agree the languages you mention are better for rapid and clean development but you lack some of the careful memory management capability.

    3. Re:Opinion by Anonymous Coward · · Score: 0

      Addendum: Every engineer worth his weight in salt should be able to write Lisp/Scheme code as well.

      Lisp is for computer scientists, engineers use assembly language.

    4. Re:Opinion by gnasher719 · · Score: 2

      Addendum: Every engineer worth his weight in salt should be able to write Lisp/Scheme code as well.

      I just had to check this. According to what local councils in the UK pay for salt for gritting streets, my weight in salt is worth less than £2.

    5. Re:Opinion by RightSaidFred99 · · Score: 1

      Totally agree. I've done a lot of C++ in the past, a lot of Perl, some Python, lots of Java, etc... and I am in _love_ with C#. The language itself and the .NET runtime is just so productive for distributed 3 tier apps and Visual Studio stands head and shoulders above any other IDE. I wish MS would port it to other platforms, if they had first-class .NET support for Linux it would take over much of the Linux enterprise development world like wildfire.

      So I'm a total C# fanboy, but Java is "good enough" I guess when I have to slum so I'd add it to that list..

    6. Re:Opinion by Zobeid · · Score: 1

      I figure most of my needs are well covered with C, Objective-C and Python.

      I once tried to learn C++ and it nearly crushed my brain. Maybe it was just a bad introduction, I dunno. I was trying to pick up OOP concepts at the same time, and my textbook offered lots of unfamiliar jargon, not much explanation. I've managed to avoid C++ ever since, and hope I can do so for a long time to come.

      As for C#, all I know is that it's something that came out of the Evil Empire, so I can't see any reason to get interested.

    7. Re:Opinion by Jeff+Hornby · · Score: 1

      A lot of the growth in C++ is for tablets. As much as it is easier to write code in a garbage collected language, that garbage collection background process is constantly running, eating up battery life and cycles on lower powered ARM processors. C and C++ don't have all of that overhead.

      --
      Why doesn't Slashdot ever get slashdotted?
    8. Re:Opinion by mlts · · Score: 1

      I'd probably say embedded growth is a help with C as a language of use. C may be venerable, but there are a lot of libraries out there for it, and almost every itch has been scratched.

      Plus, there are a lot of tricks one can do with C to be able to cram more code and features into a limited EEPROM space than they can do with Java or a high level language that requires a VM, or a ton of abstraction to work right.

      As always, if worse come to worst, there is always inline assembly.

    9. Re:Opinion by Raenex · · Score: 3, Interesting

      Every engineer worth his weight in salt

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

    10. Re:Opinion by sapgau · · Score: 1

      Citation needed!

    11. Re:Opinion by Jeff+Hornby · · Score: 1

      Citation? On Slashdot? Are you new here or something?

      Actually, I was talking to a C++ programmer who told me that she was seeing growth in the tablet area in her business.

      --
      Why doesn't Slashdot ever get slashdotted?
    12. Re:Opinion by Anonymous Coward · · Score: 0

      That chart actually shows that C++ and Java usage are slowly decreasing; C usage is stable; and C# usage is steadily increasing. Objective-C usage rose sharpky since iOS inception etc.

    13. Re:Opinion by Anonymous Coward · · Score: 0

      You can't run C#, Ruby, or Python code if you don't have a compiler which generates machine code. Of which C is by far the most popular.

    14. Re:Opinion by Anonymous Coward · · Score: 0

      And what have you acomplished today? Finding people to correct on the Internet isn't exactly rocket surgery.

    15. Re:Opinion by Anonymous Coward · · Score: 0

      Yeah, there is absolutely no overhead to all that horrible reference counting manipulation bullshit in whatever "smart" pointer library you happen to be using for C++. While automatic garbage collection has difficulties like any automated general purpose process will, there are numerous ignoramuses that assume the alternatives are "free". Large scale C and C++ applications find plenty of opportunities to sneak "overhead" into memory management, just by maintainers thinking that garbage collection is the work of the devil at the outset and thinking their makeshift resource handling solution is automatically better than a well implemented precise, incremental, generational garbage collector. Finally, I always get a laugh when garbage collector == Boehm implementation, as if this has any relevance to a comparison with modern garbage collection techniques.

    16. Re:Opinion by Anonymous Coward · · Score: 0

      C is what those languages and your OS that is running it are written in =)

      The stuff that you work on is probably very time consuming to write in C, but there are things that you currently just can't realistically do in C#, Ruby or Python.

    17. Re:Opinion by Heir+Of+The+Mess · · Score: 1

      In the last couple of years I've seen more and more C in code bases for mathematically intense applications due to requiring C for GPU programming. OpenCL and Cuda are C based and from where I'm standing are the two main choices for GPU programming at the moment. Something on the horizon that looks interesting is Microsoft's C++ AMP stuff which fullfills the same need.

      --
      Australian running a company that does C# / C++ / Java / SQL / Python / Mathematica
    18. Re:Opinion by Wildclaw · · Score: 1

      I am curious abobut where the C growth is coming from. Embedded stuff? Native libraries for the increasing volume other higher level languages? ;)

      Considering the massively flawed and naive methodology that TIOBE uses, the answer is fairly simply. "C programming" hasn't increased. "Objective C programming" has.

    19. Re:Opinion by Anonymous Coward · · Score: 0

      http://www.saltworks.us/salt_info/si_HistoryOfSalt.asp#historyecon

      gp usage is fine

    20. Re:Opinion by Raenex · · Score: 1

      It's OK in that it conveys the sense of salt being valuable, where the phrase "not worth his salt" derived its meaning, but his usage was unidiomatic and mixed up with another idiomatic phrase. It's even worse that in today's world salt is very cheap by weight, yet gold is still very valuable by weight, so I dispute that his usage was "fine".

    21. Re:Opinion by degeneratemonkey · · Score: 1

      A bit late, but I feel some response to the replies is in order.

      Note that I am not suggesting that C isn't a useful language. The fact that it is used for lower-level software and services is, however, somewhat irrelevant when discussing the most widely used languages.

      Mind you, a language is more widely used if there are more extant lines of production code written in it -- not if the programs represented by those lines of code are more widely deployed.

      Obviously, the Linux kernel (as one example) is very widely deployed and is written in C and C++.

      Finally, my "C#, Ruby, and Python" choices were regarding the "best" languages according to a collection of my own chosen, subjective language qualities such as library support (including robust FFI), multi-paradigm expressiveness, and maintainability.

      I spent the better part of a decade writing production C++ code; anything that can be done in the higher-level languages obviously can be accomplished with pure C++ code. That does not imply that it should be, for any number of reasons that depend on the task at hand.

    22. Re:Opinion by degeneratemonkey · · Score: 1

      I can't blame him; he's right. My mistake is similar to when a person says they "could care less" when the intended meaning is that they "couldn't care less."

      Sometimes I herp, and sometimes I derp.

  10. Popularity Contest by Anonymous Coward · · Score: 2, Insightful

    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

    1. Re:Popularity Contest by JAlexoi · · Score: 1

      SIMPLE! - All of the major Scandinavian banks.

  11. Trends swinging back by concealment · · Score: 1

    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.

    1. Re:Trends swinging back by degeneratemonkey · · Score: 1

      It is unclear to me how 9 out of the top 10 languages in the list are not "general purpose" languages. I'll give you PHP, but nobody likes PHP anyway; do they?

    2. Re:Trends swinging back by Rufty · · Score: 1

      PHP the language is just the sucky side of adequate. PHP the runtime library is written by muppets on crack. Sometimes it's bazfoo(a,b) and unbazfoo(b,a) but you'd better check the documentation, 'coz it may well be unBazFoo(b,a), unfoobaz(a,b), de_baz_foo(a,a,b,opts) or something even stranger. So why's php even on the charts? Well, no matter how brain dead the library, it's available the same on many different platforms. It probably includes the functionality you need without having install a compiler (thanks ruby_gems!) It might not be the same version, but the functionality won't have changed without recognition (again ruby_gems), and won't be wildly different (sigh, ruby_gems). But the documentation is absolutely brilliant. Whatever braindeadness the library does, it's documented. Fully. With examples. And probably with comments by programmers who have seen just how nuts it is and have helpful tips. (Even if it's just "Use python, dude!").

      --
      Red to red, black to black. Switch it on, but stand well back.
    3. Re:Trends swinging back by gbjbaanb · · Score: 1

      no, I disagree bout GP languages.. people are returning to C++ because the 2 areas that are very popular right almost now require it - mobile and the cloud.

      Both these have energy and resource issues, one because you have small, resource-constrained devices, and the other because you're trying to cram as many users onto as few servers as possible. So if you code with a dynamic language that is easy to code for, but less efficient with resources, then you end up costing yourself a lot of electricity.

      This is the reason Microsoft has given for returning to C++.

    4. Re:Trends swinging back by sapgau · · Score: 1

      Whenever I have to go back to PHP I make sure to read the documentation (http://php.net) AND all of the comments.

    5. Re:Trends swinging back by sapgau · · Score: 1

      Mode parent up.
      End of thread.

  12. Windows kernel is C by Comboman · · Score: 4, Informative

    The Windows OS kernel is mostly in C with some assembly (just like Unix/Linux/BSD/OSX). The Windows GUI is mostly C++ (but so is KDE).

    --
    Support Right To Repair Legislation.
    1. Re:Windows kernel is C by chuckinator · · Score: 2, Insightful

      KDE technically isn't C++. It's written in Qt, which is a set of bastardized extensions to C++ (see meta object compiler) that produce generated C++ code. It's unfortunate that Nokia (who bought Trolltech way back when) invested so much time and effort into something the is effectively obsoleted by Boost.

    2. Re:Windows kernel is C by Viol8 · · Score: 3, Insightful

      Except that Boost is an unholy mess designed by students who threw in everything they thought would be cool without a decent overall approach. If it disappeared overnight I wouldn't shed any tears.

    3. Re:Windows kernel is C by Prien715 · · Score: 1

      ...except that boost is slow, unreadable, still doesn't support unicode, and I can't find a single object in Qt where the boost implementation is better.

      Qt tries to extend C++ elegantly and if they have to use MOC so they can continue to support legacy compilers while providing object introspection and great interthread communication fine.

      --
      -- Political fascism requires a Fuhrer.
    4. Re:Windows kernel is C by Anonymous Coward · · Score: 2

      That was my concern when I started to use Qt.
      But now, after a couple of years, I find the Qt approach just OK: everything is handy when you are building the GUI. You can focus on GUI development without having to build complex functionality in first place.

      The QString, for instance, I do not see it as a replacement of std::string anymore. I use std::string for methods which do nothing with the GUI, but I use the QString flexibility to provide a message or whatever quickly, at the GUI side. It is easier to write:

      QString something = QString("blah %1 out of %2").arg(i).arg(n);

      than:

      ofstringstream oss;
      oss "blah " i " out of " n;
      string something = oss.str();

      You may use the std:: way when you are concerned about efficiency (or even use char*), but the QString approach is just fine for the GUI. Well, I've not tested QString performance against std::string - perhaps it is comparable or faster or slower- it is quick enough for the GUIs.

    5. Re:Windows kernel is C by glebovitz · · Score: 1

      I think you overstate the amount of code generated by the MOC processor. Qt wouldn't need MOC if C++ produced actual meta data for its objects. Without the meta data, dynamic binding is very hard to do. I'd say it is an elegant solution to a key missing capability of C++.

      While boost is in wide use, Qt has grown exponentially over the past few years independent of Nokia mobile projects. It is one of the key frameworks used in building Linux based touch oriented embedded systems.

      Saying the KDE isn't C++ is like saying Linux applications aren't C++ because the include a large variety of system and add on libraries to do their work.

      Qt is written in C++. Even the MOC is written in C++..

      An interesting side note is that many of the capabilities required by Qt for handling dynamic binding have been added to C++ 2011.

    6. Re:Windows kernel is C by jpapon · · Score: 1
      The QT documentation crushes the Boost documentation. Say what you will, but it sure makes learning to use it a hell of a lot easier.

      Not to mention, CMake makes using the MOC compiler really easy (assuming you've moved past qmake, which I think is a good idea), so you barely even notice it when compiling.QT is great for GUIs, thread handling, message passing, and even things like TCP. I recently worked on a project where an intelligent programmer wasted days of my life because he insisted on using Boost for his side of our communication. Our stuff was written in QT, worked right away, and the code was easy to read.

      --
      -- Let us endeavor so to live that when we pass even the undertaker shall be sorry. -- M. Twain
    7. Re:Windows kernel is C by suy · · Score: 2

      KDE technically isn't C++. It's written in Qt, which is a set of bastardized extensions to C++ (see meta object compiler) that produce generated C++ code.

      This is the worst description I've seen of Qt and the MOC in a long time. Qt is perfectly valid and normal C++. It just requires that you link against some generated code. Big deal. However, since the code generator (Meta Object Compiler) has the word "compiler" in it, either fools some people into thinking that requires some special tool, or is used to spread some FUD.

      Breaking news: the XML files that Qt Designer creates are used to generate C++ code.

    8. Re:Windows kernel is C by Anonymous Coward · · Score: 0

      Totally agree. I am amazed that many companies are seriously considering using it.
      This is an completely amateur project with some "nice, fancy" new C++ features.

    9. Re:Windows kernel is C by ardor · · Score: 4, Insightful

      Some parts of boost are excellent, some are crap. Your comment reeks of ignorance.
      Some excellent libraries are: optional, bind, any, lexical_cast, multi-index container, graph (documentation is awful though), xpressive, shared_ptr, asio.

      --
      This sig does not contain any SCO code.
    10. Re:Windows kernel is C by ardor · · Score: 1

      How the hell is Boost supposed to be slow? The term "slow" does not make sense. Which boost library are you *specificially* referring to?
      Same goes for Unicode. What does, say, boost.optional have to do with Unicode?

      --
      This sig does not contain any SCO code.
    11. Re:Windows kernel is C by Tough+Love · · Score: 2

      It is the approach that matters, not the particular library. There is no great trick to Boost signals/slots, I coded a servicable one myself using libsigslot to get the basic idea. The thing is, once you have done so the whole misbegotten MOC mess becomes irrelevant and you can integrate your signal/slot code with, for example, your project templates.

      I keep seeing these elaborate explanations full of bafflegab about introspection and scripting support to justify QT's big design mistake with MOC, but the arguments just don't hold water. You can do all the introspection you need without any preprocessor pass.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    12. Re:Windows kernel is C by stanlyb · · Score: 1

      Seconded.

    13. Re:Windows kernel is C by stanlyb · · Score: 1

      You mean, that these wonderful libraries are better than ACE?

    14. Re:Windows kernel is C by DamnStupidElf · · Score: 1

      It's going to be rather hard to get Boost libraries out of the official C++ standard. You may have to wait 10 or 20 years to depreciate them.

    15. Re:Windows kernel is C by ardor · · Score: 1

      What kind of comparison is this? ACE is something *completely* different. You are comparing apples to oranges.

      --
      This sig does not contain any SCO code.
    16. Re:Windows kernel is C by Darinbob · · Score: 0

      Boost is bloated from all I've ever seen of it. It appears to have been designed by people who drank the C++ koolaid.

    17. Re:Windows kernel is C by Tough+Love · · Score: 1

      It's going to be rather hard to get Boost libraries out of the official C++ standard. You may have to wait 10 or 20 years to depreciate them.

      Boost libraries are not in C++03 or C++11 or any other official C++ standard that I know of.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    18. Re:Windows kernel is C by Tough+Love · · Score: 2

      QT MOC is the opposite of elegant, it is an abomination. But it has no shortage of apologists.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    19. Re:Windows kernel is C by luis_a_espinal · · Score: 1

      Word. It gives me headaches everytime I have to use a ofstringstream. The QString-styled constructor is such an obvious thing to have. It is little things like this that helps (or encumbers) software development.

    20. Re:Windows kernel is C by Anonymous Coward · · Score: 0

      You're really going to claim he's wrong? Amazing.

    21. Re:Windows kernel is C by GuidoW · · Score: 2

      I disagree whole-heartedly. I've been using Boost for a number of years, and although it's been a bit hard to get into at times, and although I've barely scratched the surface of the available libraries, it has made my life a lot easier. Many of the available libraries complement the standard C++ library very nicely. No matter what parent post says, it's also fairly well accepted, to the point that it is not a long shot to expect a random competent C++ code to be able to work with it.

      Personally, I'm pretty much treating it as an extended standard library these days.

      --
      If it's so secret, then how come I've never heard of it?
    22. Re:Windows kernel is C by pwizard2 · · Score: 1

      The Qt documentation is indeed excellent. If I have a Qt-related problem I can't solve off the top of my head, I've found that I can usually get a solution from the Qt doc in about five minutes.

      I've never used Cmake, how is it better than Qmake? I've never understood what the big deal is with MOC anyway... the compile process works fine the way it is. Everytime I need to build something in Qt I just have to run qmake on the pro file and then make and then I'm done... really easy. The only time compiles can get complicated is if I have to roll my own Qt first (usually to get support for an SQL driver or something like that) and even then I only have to do that once.

      --
      "It is a denial of justice not to stretch out a helping hand to the fallen; that is the common right of humanity."
    23. Re:Windows kernel is C by loufoque · · Score: 3, Interesting

      I'll give you my opinion as an experienced C++ developer, Boost contributor and C++ standards committee member.

      Boost is a set of C++ libraries written by a lot of different people. Some is good, some is bad. Some is old and works with ancient compilers, some is new and requires the latest bleeding edge implementations.The good thing it has about it compared to average code is that it was written by people with a relatively good understanding of the C++ programming language, which is very complex. This typically means that not only it is of better quality than average, but also that it can do more advanced things than what an average developer could think of As such, it is very good for educational purposes, and just reading through the code or the documentation can make people discover very interesting software design. Of course, some libraries have very tedious implementations and are very mature (like PP or MPL), so there is no point in rewriting them yourself: just use them directly.

      The fact that it is advanced is however a double-edged sword: to use software in production, you must be able to easily diagnose problems and bugs, even if the code is not yours. Doing that with advanced language constructs can require some non-elementary skills, therefore using those libraries can require a steep learning curve and should thus be seen as an investment.

      It's all a matter of studying the library for your needs, evaluating the risks, and making your choice.

    24. Re:Windows kernel is C by shutdown+-p+now · · Score: 1

      Boost is not a single library, it's a collection of many largely independent libraries by many different authors. It doesn't make any sense to judge it as a single thing.

    25. Re:Windows kernel is C by shutdown+-p+now · · Score: 1

      The problem with QString is that, as soon as you use some other library (that is, other than Qt), you need to convert your QString to something else. There used to be a time where every single damn C++ library came with its own MyStringIsBetter class, and it was always so damn annoying. These days, using std::string (or wstring) is the right thing to do, because those can be passed around everywhere.

      And if you need advanced functionality, that can be provided as free methods that operate on string objects. In your particular example with string formatting, here's how you do that with std::string and Boost.Format:

      std::string something = str(boost::format("blah %1% out of %2%") % i % n);

    26. Re:Windows kernel is C by c++0xFF · · Score: 2

      Oh really? Look at most of TR1 for plenty of examples of Boost libraries that are now part of the C++ standard.

      Boost is a proving ground for many concepts that have since been adopted into the language as part of C++11. Some Boost libraries are no longer needed because of native language support rather than a library (BOOST_FOREACH is now a syntax feature, not to mention lambda expressions), and these language features are often clearly designed after the Boost equivalent (as far as I can tell). Others were imported with not much more than a namespace change (shared_ptr, anyone?). Then largest import was probably the threading library, followed by the random number generators and regular expressions.

      Stack Overflow has a great list to get you started.

      The amount of Boost in C++11 is quite amazing.

    27. Re:Windows kernel is C by smellotron · · Score: 1

      How the hell is Boost supposed to be slow?

      Ok, I'll bite. Concrete example: I've seen BOOST_FOREACH cause my compiler to fail to optimize a std::vector iteration down to the appropriate pointer arithmetic. I replaced it with a simple for loop and the problem went away. If memory serves, this was GCC 4.3.x and boost 1.40. Theoretical argument: In my experience (blogs and conversations), proponents of the "modern C++" approach (boost or any other heavy dependency on templates/inlining) tend to hand-wave the compiler's optimization pass. In a large codebase, small changes in inline functions can have chaotic effects on an optimizer's heuristics. Because the code is inline, there is no way for a library developer to reliably tune for good performance for a downstream developer. Furthermore, unnecessary duplication in template logic (mostly from poorly-optimized template classes) can bloat the instruction stream something awful, which will kill cache performance.

      Also, boost adds a lot of compilation overhead, and I don't have a sword at my desk. Most libraries at least incorporate config.hpp, which ends up bringing in <cmath> and messes with any code that was already using the (global namespace) macros defined in <math.h>. IIRC same with several other standard headers: the "C++" version is not entirely compatible with users of the "C" version, even on the most popular platform (glibc/linux).

    28. Re:Windows kernel is C by dcbrianw · · Score: 1

      Boost is generally the R&D cutting edge of C++. As mentioned in other posts, it generally serves as the testing ground for what becomes part of the C++ ISO. You can see much of this in C++11. Some of the boost developers actually sit on the standards committee. In my professional work, Boost has provided some very vital functionality that my teammates and I didn't have to create, but could simply use. And in all cases it worked very well for us and continues to do so. Do you have specific reasons for describing it as an unholy mess? If you have encountered genuine pitfalls with the libraries, would you share that info?

    29. Re:Windows kernel is C by Tough+Love · · Score: 1

      The TR1 libraries you speak of are derived from Boost or inspired by Boost, they are not Boost. That is, the APIs are not necessarily compatible.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    30. Re:Windows kernel is C by ardor · · Score: 1

      Note that Boost is a collection of library, not one big one. For several of the libraries your bloat claims are true. This is the reason why I avoid Spirit, for example.

      Some of the Boost libraries I use the most are: lexical_cast, optional, any, multi-index container, foreach (I tested out your problem, and didn't encounter it... but Boost 1.40 is very old, perhaps it was fixed), bind, function, noncopyable, format, pool, array, assign, bimap, iostreams, iterators, range, move, ref, thread, tuple.
      I haven't experienced significant bloat in the binary with most of them, and access boost arrays in inner loops for example, which I verify by looking at the disassembly. Now, iostreams has an overhead of course (the usual iostreams one, pulling in locales amongst others). Format is going to be slower than printf, but I don't use it in places where performance is critical.

      My point is that you are throwing out the baby with the bathwater. Right tool for the right job, please. Boost is not a panacea, if you use Boost.Spirit for a binary that you are going to flash into an ARM926 platform with 100k of NAND flash, you are doing it wrong. As said before, I agree that some libraries are crap, other are excellent from a pure theoretical point but actually quite impractical (I am looking at Spirit again, and also on Proto, since it is rarely useful to non-library developers), others are useful for meta-programming, but you should not do that too often (Fusion, MPL, type traits, enable_if), otherwise you indeed get bloat. It is a fad right now to templatize everything in sight, yes, and this is in general a very bad idea. I worked with some people once who put EVERYTHING in the headers, with the result that compiling one .cpp file took several minutes on an i5, and consumed 2 GB RAM. The resulting object file was enormous.

      As for your cmath problem, guess what, I experience similar issues with Qt. They define a "signals" macro, which then collides with variables called "signals". This is especially fun with signal processing software (I added a Qt GUI to one once). Similar issues exist with OpenGL headers and extension libraries etc. Furthermore, mixing cmath and math.h will cause problems, and you said. I use cmath in my code. Ditching cmath in favor of math.h is the wrong approach. The right one is to isolate the code that uses math.h.

      --
      This sig does not contain any SCO code.
    31. Re:Windows kernel is C by jpapon · · Score: 1

      CMake is far more flexible, and allows you to make complex build scripts. For instance, I have CMake scripts that build my CUDA code alongside my main app QT code, switching to the CUDA compiler when needed. It also makes linking in other libraries very easy thanks to the great FindCMake scripts that exist for most major libraries. This isn't such an issue when you're just coding for yourself, but when you want to distribute your code, it sure reduces the headaches.

      --
      -- Let us endeavor so to live that when we pass even the undertaker shall be sorry. -- M. Twain
    32. Re:Windows kernel is C by c++0xFF · · Score: 1

      A quote from the front page of boost.org is relevant here:

      We aim to establish "existing practice" and provide reference implementations so that Boost libraries are suitable for eventual standardization. Ten Boost libraries are included in the C++ Standards Committee's Library Technical Report (TR1) and in the new C++11 Standard. C++11 also includes several more Boost libraries in addition to those from TR1. More Boost libraries are proposed for TR2.

      The goal of Boost is to provide libraries that will eventually become standardized. Yes, some changes (slightly different API, removal of features, addition of features, etc) will happen as part of this process, but they are still Boost. The fact that a compiler can (and probably will) write a different implementation of these libraries doesn't change that.

      Or were you expecting the standards committee to require people to use the Boost implementation and namespace?

    33. Re:Windows kernel is C by GuB-42 · · Score: 1

      MOC is mostly for the part of Qt that deals with signal and slots, a form of loose coupling for objects that is very convenient for GUIs. Boost-like features of Qt are standard C++ and don't require a precompiler.

      What may be unfortunate is that once you decide to use Qt there is no turning back because you will end up with Qt objects everywhere in your code. But isn't it the same with boost ?

  13. Because of speed and compatibility. by Ateocinico · · Score: 1

    Because you NEVER have enough speed. Besides most useful libraries are written in C or C++
    and lather binds are built for other languages. So, if you want or need to use the latest
    version, or the library hasn't bindings, you must go for C or C++.

  14. NXT-G ? by godrik · · Score: 2

    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?

    1. Re:NXT-G ? by sudden.zero · · Score: 1

      Yes, it is! It is the programming language for LEGO Mindstorm and I have used it.

    2. Re:NXT-G ? by Anonymous Coward · · Score: 0

      Yes, and yes.

      Does it surprise you that more people are writing Lego robotics programs than are writing bash scripts? Bash is a terrible scripting language; I avoid it at all costs myself.

    3. Re:NXT-G ? by flabordec · · Score: 2

      Because programming LEGOs is awesome! Really, take a look at some of these videos. There are also a lot of competitions for middle level school children and there is a big push to get it into computer science classes at elementary and middle school level, so it is being used a lot by younger kids.

      --
      "I see undead people" Warcraft III - Necromancer
    4. Re:NXT-G ? by Sez+Zero · · Score: 1

      This past year I only used 6 of the top 20. NXT-G was one of those.

      In previous years I've been up to 10 of the top 20, but that was contracting instead of working a "normal" job. Of course 5 of the top 20 I've NEVER used, but I've still got time before Ada drops off the list.

    5. Re:NXT-G ? by RightSaidFred99 · · Score: 1

      Lol, more people aren't writing Lego robotics programs than Bash scripts. The idea is ridiculous.

      More people may _report_ to this data source such a thing, but who knows about it when some sysadmin writes a 5 line bash script to automate something? Nobody but that guy.

      That data is mostly meaningless.

    6. Re:NXT-G ? by Anonymous Coward · · Score: 0

      You'd rather write shell scripts than play with robots?

  15. Not a ranking of the best or the most by Relayman · · Score: 5, Insightful

    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.

    --
    If I used a sig over again, would anyone notice?
    1. Re:Not a ranking of the best or the most by azalin · · Score: 1

      In that case it's almost a wonder Perl is even included.
      I mean how often do you really need more than a single (or at least very very few) line(s) of Perl to get anything done?

    2. Re:Not a ranking of the best or the most by medv4380 · · Score: 1, Interesting

      It can help show trends though. I wouldn't put much stock in C and C++ recovering ether given the numbers. More likely Java has continued to take serious blows to its user base. Java mostly resembles C and C++ code so the fleeing away from Java is what I would attribute the increase in C and C++ coders. The market is basically ripe to have Java cut out of the market. Which is unfortunate, but I understand. Ever since Oracle put its doom cloud up I've had doubts about continuing projects in Java and have been flirting with other languages to see if something else could replace it for my personal uses. Otherwise I'm left with .net since that's what my work likes.

    3. Re:Not a ranking of the best or the most by Anonymous Coward · · Score: 0

      Perl makes up for brevity by being unreadable, so people continuously write new Perl code from scratch rather than try to update and reuse it. ;-)

    4. Re:Not a ranking of the best or the most by tlhIngan · · Score: 1

      It can help show trends though. I wouldn't put much stock in C and C++ recovering ether given the numbers. More likely Java has continued to take serious blows to its user base. Java mostly resembles C and C++ code so the fleeing away from Java is what I would attribute the increase in C and C++ coders. The market is basically ripe to have Java cut out of the market. Which is unfortunate, but I understand. Ever since Oracle put its doom cloud up I've had doubts about continuing projects in Java and have been flirting with other languages to see if something else could replace it for my personal uses. Otherwise I'm left with .net since that's what my work likes.

      I'd say Java isn't doomed. Neither is C/C++.

      Because while Android doesn't run Java, it's programmed in Java. And iOS' Objective-C interfaces nicely with C/C++. Hell, if you're writing an Android/iOS cross platform app, you'd do a lot of the backend in C/C++ and the front end in Obj-C/Java.

      I believe the rise of those languages is due to the popularity of mobile platforms. C# probably holds its own based on traditional computing (Windows Phone not being a significant factor).

    5. Re:Not a ranking of the best or the most by gbjbaanb · · Score: 1

      The better links t check your language is in demand is the job-search ones like IT Jobs Watch but I've noticed that can show a fair bit of volatility.

      Currently jQuery and PHP are growing in popularity.

      As for C++, Microsoft have discovered that their .NET languages are quite resource hungry, and that the cloud and mobile require more efficient resource use, hence their "C++ Renaissance" push.

      Not that .NET will disappear, just that it'll become more of the language that filled the niche VB left vacant as their systems programming becomes more c++ oriented. Can't blame everyone from fleeing Java, even if oracle doesn't screw it up, it's still fast becoming a legacy language (ie the new Cobol :) )

    6. Re:Not a ranking of the best or the most by Anonymous Coward · · Score: 0

      You've never used APL, or even more compact APL2? Have you.

      In these languages, you con't count lines, you count characters.

    7. Re:Not a ranking of the best or the most by tazan · · Score: 1

      It's not even a survey it's a giant troll. It's clearly wrong on several counts.

    8. Re:Not a ranking of the best or the most by shutdown+-p+now · · Score: 1

      TIOBE helps show trends in the languages itself (i.e. it will show when the language popularity trends up or down), but it doesn't give you meaningful comparisons between languages - the numbers for that could just as well being pulled out of someone's ass. So "C++ back on top" - which is the "news" here - is not a given at all. "C++ trending up" is, but then if you deal with C++, you probably knew that much already - it's been plainly noticeable for the last couple of years.

  16. C++ by Anonymous Coward · · Score: 0

    C++ is the hard core, it must work, programming language of choice. The F-35's software is being developed in C++.

    1. Re:C++ by Drethon · · Score: 1

      Just my opinion but C++ isn't so much the code must work but more the code must do exactly what the developer thinks it is. Higher level languages may not implement a statement the way you think it is so requirement/code coverage is more difficult.

    2. Re:C++ by Anonymous Coward · · Score: 0

      Yeah, and when you sahy "the F-35" you mean that literally because we will only be able to afford one.

      Whatever happened to Ada for mission crit? C++? God help us. The Department of Defense regrets to inform you that your kid is dead because of some subtle semantics.

  17. Logo is #19? by gnasher719 · · Score: 1

    I thought they were counting actual use, and not vague childhood memories?

  18. The TIOBE index is *ABSOLUTELY MEANINGLESS* by Anonymous Coward · · Score: 5, Interesting

    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!

    1. Re:The TIOBE index is *ABSOLUTELY MEANINGLESS* by Anonymous Coward · · Score: 2, Interesting

      Agree. A better methodology would be to count references in the top job sites monster, dice, careerbuilder, etc. This will give you the languages that are hot now. You'll see a lot more java than C/C++, for one thing.

    2. Re:The TIOBE index is *ABSOLUTELY MEANINGLESS* by Hentes · · Score: 1

      True, but almost all the sites trying to measure language popularity do something similar, so while I agree that it's inaccurate comparing search results is still the best method we've got.

    3. Re:The TIOBE index is *ABSOLUTELY MEANINGLESS* by Alomex · · Score: 1

      ABSOLUTELY MEANINGLESS

      You overplayed your hand. Had you said "not very meaningfull", you would have been right, but you went for hyperbole and end up being wrong. Even a noisy signal carries quite a bit of information.

      For one, since the methodology is self-consistent, a change in relative position even in this flawed ranking is with very high probability paralleled by a move (though not necessarily a swap) in the actual ranking in the actual index with the proper absolute rankings.

      By the way, around here, at a puerly anecdotical level, we've seen a raise in interest on C/C++ and a relative drop on Java.

    4. Re:The TIOBE index is *ABSOLUTELY MEANINGLESS* by Anonymous Coward · · Score: 0

      I completely disagree.

      The index is 100.0% meaningless. It's akin to placing a single temperature sensor near the AC in a huge warehouse - and claiming that it reflects the temperature in the warehouse. It may tell you whether the AC is working or not, but it has nothing to do with the temperature.

      In other words - if they were checking 20 other search terms, such as 'foo development, 'foo developers', 'foo language', etc. - and averaging them out - then maybe it has some sort of a meaning. Then too - I'd argue that it has a lot more to do with the search & aggregation algorithms of the search companies than anything else (which change very rapidly all the time) then reality - but it'd at least be a bit more serious. The way it is now, I stand by my comment that it's absolutely meaningless. The way they normalize it (against each other out of 100% instead of as an absolute number) makes it even less meaningful.

      The amazing thing is that people still buy it as if it's a god-given fact. I'd actually happily settle for people realizing that it's "not very meaningful" rather than completely meaningless, even though I believe the latter is true. TIOBE even goes to the extent of saying that "The ratings are based on the number of skilled engineers world-wide, courses and third party vendors", which they are most certainly not (unless you claim that 'lua programming' search term somehow correlates to the worldwide number of skilled engineers and courses').

      Even though this 'index' is perhaps slightly closer to reflect the popularity of programming languages than say, your monthly grocery bills - it's not significantly closer. Python more popular than Javascript? Come on, this is 2012.

      Just as an example demonstrating how poor this index correlates to reality, consult this partial score for only Web languages:
      http://w3techs.com/technologies/overview/programming_language/all

      This is based on real measurements of de-facto usage. See the difference.

    5. Re:The TIOBE index is *ABSOLUTELY MEANINGLESS* by Alomex · · Score: 1

      It's akin to placing a single temperature sensor near the AC in a huge warehouse

      Excellent example. When you see the sensor suddenly go down, this means the AC just went on, hence the warehouse was hot. On the other hand when you see the sensor start going up, this means the AC just switched off, which means it just finished cooling. So there you go, I just showed you how it indeed reflects the temperature of the warehouse, but through an inverse and intermittent relation.

      In other words - if they were checking 20 other search terms, such as 'foo development, 'foo developers', 'foo language', etc. - and averaging them out - then maybe it has some sort of a meaning.

      No it actually wouldn't, unless you have a reason to believe that Java programmers would type Java programming more frequently that Lisp programmers would type Lisp programming.

      And even then we could still recover a signal from the measurement. Say, for the sake of the argument Lisp programmers are 10x less likely to type "Lisp programming" than Java programmers. Still an increase in the number of such queries reflects an increase in the interest in Lisp.

      It is clear you have no experience extracting information from noisy sources, and you confuse your inability to do such an extraction with an absence of information on the source itself.

      The way it is now, I stand by my comment that it's absolutely meaningless.

      I didn't expect otherwise. The way you wrote your hyperbole in all caps suggests that you are the type of person who lets their emotions override their rational thoughts.

    6. Re:The TIOBE index is *ABSOLUTELY MEANINGLESS* by Raenex · · Score: 1

      For one, since the methodology is self-consistent, a change in relative position even in this flawed ranking is with very high probability paralleled by a move (though not necessarily a swap) in the actual ranking in the actual index with the proper absolute rankings.

      You overplayed your hand as well, because TIOBE is not self-consistent. TIOBE rankings can go through wild swings from month to month as they change their methodologies. They do things like add or subtract words, add rank inputs like new search engines, and have "a manually determined confidence factor" that they apply. In addition, the search engines underneath them change their methods over time, and these don't necessarily correspond to what TIOBE is trying to measure -- language popularity.

      This story and TIOBE watching in general is ridiculous. The idea that the numbers from several years apart can be meaningfully compared is a fallacy -- unless you're willing to undertake a serious study of the numbers and how they were derived, including the underlying search engines.

    7. Re:The TIOBE index is *ABSOLUTELY MEANINGLESS* by Alomex · · Score: 1

      TIOBE rankings can go through wild swings from month to month as they change their methodologies.

      It is my understanding that they simply search for "X programming" for all X values in the set of programming languages. Thus the self-consistency claim. You are saying that they change that?

    8. Re:The TIOBE index is *ABSOLUTELY MEANINGLESS* by Raenex · · Score: 1

      It is my understanding that they simply search for "X programming" for all X values in the set of programming languages. Thus the self-consistency claim. You are saying that they change that?

      Yes, they do. Read the definition page. There's even a current example on the main page, under "This Month's Changes in the Index":

      "Andrew Gerrand suggested to add "golang" to the Go programming language. This month Go gained 10 positions from #72 to #62."

    9. Re:The TIOBE index is *ABSOLUTELY MEANINGLESS* by Alomex · · Score: 1
      I'm reading both pages, including the "This Month's Changes in the Index" part and I don't see anything suggesting lack of self-consistency.

      This Month's Changes in the Index This month the following changes have been made to the definition of the index:

      • Andrew Gerrand suggested to add "golang" to the Go programming language. This month Go gained 10 positions from #72 to #62.
      • There are lots of mails that still need to be processed. As soon as there is more time available your mail will be answered. Please be patient.
    10. Re:The TIOBE index is *ABSOLUTELY MEANINGLESS* by Raenex · · Score: 1

      Maybe you don't see it because you've got blinders on? This is what you said: "It is my understanding that they simply search for "X programming" for all X values in the set of programming languages."

      And I pointed to a specific example where they did something different from one month to another, and how it caused the ranking for a language to jump 10 positions. I'm not interested in arguing with people that won't admit the most basic errors in their positions.

    11. Re:The TIOBE index is *ABSOLUTELY MEANINGLESS* by Alomex · · Score: 1

      Maybe you don't see it because you've got blinders on?

      Or maybe that is an irrelevant fine tuning of the method in regards to other languages.

      I'm not interested in arguing with people that won't admit the most basic errors in their positions.

      Lower your caffeine intake dude. I was ready to admit an error when I went to look at the changes pages, thinking I would see major shifting in methodology. Instead I saw one rather irrelevant change for an aberrant language (in terms of name) called Go.

      You give bad evidence, I won't change my mind, you give good evidence and I change my mind.

    12. Re:The TIOBE index is *ABSOLUTELY MEANINGLESS* by Raenex · · Score: 1

      You're moving the goalposts, as you said "It is my understanding that they simply search for "X programming" for all X values in the set of programming languages." [emphasis mine]

      They routinely go beyond that, and what they do changes from time to time with material impact. That's a simple statement of fact, so you cannot naively rely on TIOBE to be self-consistent.

      The other problems, which you haven't addressed are:

      • "add rank inputs like new search engines"
      • "the search engines underneath them change their methods over time, and these don't necessarily correspond to what TIOBE is trying to measure -- language popularity."
      • "have "a manually determined confidence factor" that they apply"

      Also, even if they were self-consistent, that doesn't change the fact that their measurements are crude and prone to false positives for a language named "C". For example, I don't see any exceptions for C, yet if I do a Google search for "C programming" and I click deep enough I see a hit for Objective-C. The rise in the popularity of Objective-C alone could be inflating C's rank.

    13. Re:The TIOBE index is *ABSOLUTELY MEANINGLESS* by Alomex · · Score: 1

      They routinely go beyond that,

      You might be right. However, I looked for previous change pages on the web site, but couldn't find them.

      That's a simple statement of fact,

      If you had better examples you should have sent them. Don't blame me for your crappy examples.

      that doesn't change the fact that their measurements are crude

      That has never been in discussion. We all agree that the signal is crappy. My only objection was with the statement that was "absolutely meaningless".

      The other problems, which you haven't addressed are:...

      It's pretty much the other way around. You need to argue why those changes are significant enough to matter. It's not like search engines one day give one count of popularity and the next a completely different one. So why should we believe that regular maintenance would radically change the results, particularly in ways that affect the ranking?

    14. Re:The TIOBE index is *ABSOLUTELY MEANINGLESS* by Raenex · · Score: 1

      You might be right. However, I looked for previous change pages on the web site, but couldn't find them. If you had better examples you should have sent them. Don't blame me for your crappy examples.

      So in other words, you choose to ignore the evidence as "crappy examples". It just so happens that this month's index was changed based on a user suggestion that caused a language to jump 10 ranks (how convenient for me, or maybe inconvenient for you), and there's a large table with groupings and exceptions and an invitation to send them suggestions for improvements, yet somehow the onus is still on me to provide even more evidence. I can lead a horse to water, but I can't make them drink, especially when they are biased because they are defending a position.

      We all agree that the signal is crappy. My only objection was with the statement that was "absolutely meaningless".

      You said more than that. You said, "since the methodology is self-consistent, a change in relative position even in this flawed ranking is with very high probability paralleled by a move (though not necessarily a swap) in the actual ranking in the actual index with the proper absolute rankings."

      Yet the introduction of a large class of false positives negates that, in addition to all the "self-consistency" problems.

      You need to argue why those changes are significant enough to matter. It's not like search engines one day give one count of popularity and the next a completely different one. So why should we believe that regular maintenance would radically change the results, particularly in ways that affect the ranking?

      Because there's a prominent example listed right on their main page:

      "What happened to Java in April 2004? Did you change your methodology?

      A: No, we did not change our methodology at that time. Google changed its methodology. They performed a general sweep action to get rid of all kinds of web sites that had been pushed up. As a consequence, there was a huge drop for languages such as Java and C++. In order to minimize such fluctuations in the future, we added two more search engines (MSN and Yahoo) a few months after this incident."

      This is my last reply.

  19. C growing? by 16K+Ram+Pack · · Score: 1

    The whole survey looks odd to me. I work on MS sites and a decade or so ago, there was quite a lot of C around, but with today's hardware, I hardly see any of it now. Maybe I'm hanging around in the wrong sites or job boards, but most of the demand on places like Jobserve seems to be around .net, Java and php. Any chance that this survey is including a load of c# results in c?

    1. Re:C growing? by Anonymous Coward · · Score: 0

      all those cool little mobile devices. They need firmware, and you're not going to be doing that in .net, java or php are you?

    2. Re:C growing? by Robert+Zenz · · Score: 1

      As far as I know, you *could* do it in PHP, because there's a PHP-to-native compiler out there...somewhere...

    3. Re:C growing? by sourcerror · · Score: 1

      Yeah, who uses Android or Windows phones, right?

    4. Re:C growing? by shippers · · Score: 1

      Think lower level, like the software that decodes an analogue data stream from the antenna or a photo sensor, or software that takes in an audio signal and converts it to ones and zeroes that represent the incoming sound, or the software that regulates battery charging current, or the software that takes capacitive signals from the screen and converts it to x-y touch coordinates, etc...

    5. Re:C growing? by SendBot · · Score: 1

      As far as I know, you *could* do it in PHP, because there's a PHP-to-native compiler out there...somewhere...

      It's called HipHop for PHP. Facebook made it and it's been out for two years now:
      http://en.wikipedia.org/wiki/HipHop_for_PHP

  20. Re:Buffer overflow by KGBear · · Score: 4, Insightful

    Sure. As soon as someone comes up with a language that produces code that runs half way as fast as C on any OS, and that at least pretends to integrate with the rest of the OS. You know, make it nice for everybody else other than developers. Oh, here's a though: how about developers get their heads out of their butts and learn how to be programmers, instead of whining that real languages don't do everything for them?

  21. Pascal but no Delphi by doconnor · · Score: 2

    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?

    1. Re:Pascal but no Delphi by cyberhooligan77 · · Score: 1

      (1) There are several Pascal commercial & open source compilers available. Delphi has a open source "alternative" called Free Pascal.

      (2) The TIOBE index mention Pascal or Delphi, but, maybe people should say "Object Oriented Pascal". Its the same case that C++, where you can code a Non Object Oriented Procedural Program, with an Object & Class Oriented Compiler, and still works.

      (3) There a similar answer in this post about separating "pure C" & "C++" as separate programming languages.

    2. Re:Pascal but no Delphi by Anonymous Coward · · Score: 0

      Delphi isn't a language, its an IDE.

      Delphi is no more of a language than Visual Studio, Netbeans, Eclipse, Xcode, or vi.

    3. Re:Pascal but no Delphi by Anonymous Coward · · Score: 0

      Delphi, is the Borland Pascal version, for Windows. Pascal can be built on any OS that has a compiler for it.

    4. Re:Pascal but no Delphi by maz2331 · · Score: 1

      I use FreePascal quite a bit for certain things on Linux. I've used it to implement a database-driven faxing system, just because string handling is so much easier than in C or C++.

  22. On the subject of comparison... by Twinbee · · Score: 5, Interesting

    A shout goes out to this site 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"".

    --
    Why OpalCalc is the best Windows calc
    1. Re:On the subject of comparison... by Drethon · · Score: 1

      Very interesting, thanks for posting. I am curious from that website why people think that C++ often doesn't do what you think it should but maybe I've spent too much time developing it...

    2. Re:On the subject of comparison... by Anonymous Coward · · Score: 0

      This site apparently lumps VB.NET and VisualBasic into the same bucket...it's like saying that a vagina and a velociraptor are the same thing because they both begin with "V".

    3. Re:On the subject of comparison... by Anonymous Coward · · Score: 0

      compare these two links

      http://hammerprinciple.com/therighttool/items/c/c-2

      http://hammerprinciple.com/therighttool/items/c-2/c

      shouldn't the results be the same ?

    4. Re:On the subject of comparison... by TheRaven64 · · Score: 1
      Speaking as someone who works on a C++ compiler, that's a comment I'd agree with. If even people implementing the language have to regularly check the spec[1] - and often have long debates over the correct interpretation - then I am not at all surprised that anyone finds it hard. The language seems to be made entirely out of corner cases. In comparison, there are very few places in C or Objective-C where it's not immediately obvious what the correct behaviour is.

      [1] I cringe slightly when referring to the official language description as a 'specification'. It is a loose description of how the language works, not a formal description of its semantics.

      --
      I am TheRaven on Soylent News
    5. Re:On the subject of comparison... by tibman · · Score: 1

      haha, i love PHP's list:

      1. I am sometimes embarrassed to admit to my peers that I know this language

      Looks like some angry people categorized it. "Most similar to: Visual Basic" ? C++ is more similar. All the control structures are identical.

      --
      http://soylentnews.org/~tibman
    6. Re:On the subject of comparison... by Anonymous Coward · · Score: 0

      PHP is top for "I am sometimes embarrassed to admit to my peers that I know this language"

      So, PHP is like mopeds and fat girls: fun until your friends find out.

    7. Re:On the subject of comparison... by Twinbee · · Score: 1

      It seems as if there's some redundancy there. But that can quite a good thing as it means we can check to see how similar they are. And though not exactly the same, they seem to be very similar.

      Eventually, they might merge the results, but if you look at how they ask the questions in the first place, it kinda makes sense how these become separate data sets.

      --
      Why OpalCalc is the best Windows calc
    8. Re:On the subject of comparison... by Anonymous Coward · · Score: 0

      I take a vastly different approach. I go to [insert job site] and do a search for "[location where I live] [java|c++|C#|etc.]" and see how many results I get. That's of course for the portion of my time I spend making sure my skills are up to par with "the market." Aside from that I try to pick up an "up and coming" language every couple years just to introduce me to new ways of thinking about old problems.

    9. Re:On the subject of comparison... by Bigbutt · · Score: 1

      That's a pretty interesting site. I don't have a problem admitting to programming and liking to use PHP and find it interesting that clicking on the "I would use this for a web project" comes up with PHP in the list (along with Javascript; which isn't what I was looking for) with a couple that I wouldn't have considered (Scala?). One of the reasons I do like it is it's very similar to C which I've done in the past. If you look at my perl code, it looks very C like :)

      [John]

      --
      Shit better not happen!
    10. Re:On the subject of comparison... by Anonymous Coward · · Score: 0

      Read the entries for Python

      On the pro-side "It is easy for beginners"
      On the con-side "It is not good for beginners"

      It seems like alot of people trolled these entries with nonsense. Python "has an annoying syntax" or "Writing code in this language is alot of work". Really?

    11. Re:On the subject of comparison... by Twinbee · · Score: 1

      Yeah, I just wish you hadn't posted as anon because then you'd read this reply and actually learn something :/

      It is ranked LOW for "This language is unusually bad for beginners". In other words, to cut out the double negative, ranked high at being good for beginners.

      --
      Why OpalCalc is the best Windows calc
    12. Re:On the subject of comparison... by shutdown+-p+now · · Score: 1

      Speaking as someone who works on a C++ compiler, that's a comment I'd agree with. If even people implementing the language have to regularly check the spec - and often have long debates over the correct interpretation - then I am not at all surprised that anyone finds it hard. The language seems to be made entirely out of corner cases.

      While I do not work on a C++ compiler, I do regularly interact with people who do (VC++) - and I can confirm that the internal alias for C++ discussion, that's frequented by these guys, is much the same as you describe. It's not uncommon to have threads of dozen messages long where some particular corner case is deconstructed in painstaking detail with plenty of Standardeze and language lawyering - and VC++ guys don't always get it right, either.

      Fun as it is, it certainly does make one wonder about the coherence of C++ language design.

    13. Re:On the subject of comparison... by shutdown+-p+now · · Score: 1

      I'm not embarrassed to admit that I know PHP. How else would I be able to make fun of PHP developers by pointing out awkward things in the language? ~

    14. Re:On the subject of comparison... by Anonymous Coward · · Score: 0

      Fun as it is, it certainly does make one wonder about the coherence of C++ language design.

      My favourite C++ design fact is that the Turing-complete nature of templates was never actually an explicit goal - they just kept adding features and one day someone turned up and pointed out that you could compute prime numbers at compile time using various nested template tricks etc.

    15. Re:On the subject of comparison... by TheRaven64 · · Score: 1

      Even more fun, you can write nonterminating templates. Compilers typically restrict the stack depth for template evaluations, so this becomes a bit harder. With C++11, constant expressions are also Turing complete, so you have two Turing complete languages that are evaluated at compile time - with this in mind, it's impressive that any C++ project ever finishes compiling...

      --
      I am TheRaven on Soylent News
    16. Re:On the subject of comparison... by PlastikMissle · · Score: 1

      Look again. VB and VB.NET are separate entries,

  23. It is good that java loses ground to C/C++ by ctrl-alt-canc · · Score: 2

    Java floating point management is flawed by design. Using java for controlling anything serious opens up a Pandora box: just look at this (and look here if you don't know dr. Kahan)

    1. Re:It is good that java loses ground to C/C++ by sourcerror · · Score: 1

      What about the strict_fp keyword?

    2. Re:It is good that java loses ground to C/C++ by Black+Parrot · · Score: 1

      Java floating point management is flawed by design. Using java for controlling anything serious opens up a Pandora box: just look at this (and look here if you don't know dr. Kahan)

      Using *any* floating point for anything serious opens Pandora's box.

      That't why universities teach all those fantsy courses in numerical processing.

      --
      Sheesh, evil *and* a jerk. -- Jade
    3. Re:It is good that java loses ground to C/C++ by istartedi · · Score: 1

      Using *any* floating point for anything serious opens Pandora's box.

      You beat me to it. Everybody should realize that floating point is "close enough" and not exact. My favorite experience with this was generating a toroid in a graphics program. The last point wouldn't join and there was this subtle yet annoying crease that wouldn't shade properly. Then I had that "Aha!" moment and realized that there was a slight difference between sin (0) and sin (2*pi).

      --
      For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
    4. Re:It is good that java loses ground to C/C++ by Anonymous Coward · · Score: 0

      Yeah ... I use Java fp on a daily basis, and I can only think these guys were enjoying their pain.

      There are limitations, but it so reminds me of people who say "you can't access interrupts? Wow, that's gonna hurt everyone everywhere!!".

      Fact is, fp is a tool to be used with care always. Once you know that fp is the tool for the job, you watch for the limitations. There are far far more screw-ups caused by people using doubles where they shouldn't (money!) than were ever caused by the flaws described in the docs you linked. Reality is that java fp hurts a few people occasionally, but the benefit of not having huge platform rebuilds totally overwhelms it.

      What do you mean, "controlling anything serious"? I build controllers for a living, and fp usage is controlled, contained and infrequent. Sorry, but your comments sound dogmatic and academic. I can't remember meeting a C programmer and discussing fp where I didn't have to start from first principles.

  24. Re:Buffer overflow by evil_aaronm · · Score: 2

    Because we can't trust programmers to be smart enough to avoid these conditions...?

    My pocket knife can be used in a completely safe manner. It can also be used in a completely unsafe manner. How it's used it up to me. Because it can be used dangerously doesn't mean that we shouldn't have pocket knives.

  25. How odd... by tompaulco · · Score: 1

    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.

    --
    If you are not allowed to question your government then the government has answered your question.
    1. Re:How odd... by The+Moof · · Score: 1

      Strange, Classic ASP doesn't seem to be on the list anywhere

      That's probably because "Classic ASP" isn't a language. The languages used in Classic ASP are either VBScript or JScript. I'm not sure how this list is compiled (site's slashdotted), but it's possible that VBScript is counted as Visual Basic.

    2. Re:How odd... by spongman · · Score: 1

      Baby steps

      dude, the baby just graduated from college and is buying a house with his new wife.

      take your time, though...

  26. Re:Buffer overflow by Anonymous Coward · · Score: 0

    Modern OS protection schemes make it very, very, very difficult to actually exploit buffer overflows nowadays. Coders really ought to be knowledgeable enough to avoid making the mistakes on their own anyhow.

  27. What's the Black line on the graph? by sl4shd0rk · · Score: 1
    --
    Join the Slashcott! Feb 10 thru Feb 17!
  28. Re:Buffer overflow by Anonymous Coward · · Score: 0

    Such as? What language protects you from bad programmers? If they can't add and subtract integers they sure as hell aren't going to be any good at sanitizing input either. If you can't cross your t's and dot your i's you shouldn't be a scribe.

  29. So much for "new" technology by msobkow · · Score: 1

    I find it endlessly amusing that the only "new" tool in that list is Ruby (and even that's been around a few years.)

    Particularly in light of yesterday's Bloomberg article claiming that the income and job pressure on senior developers is because they weren't trained in the "new tools." It looks to me like marketshare demonstrates companies are more interested in stable technology than new technology.

    I'm not surprised Java is sliding, though. It's really become a server-centric language over time, which means there are far fewer deployments per customer than there are for the client-side components of the whole system, such as C# and Objective C++ clients that access those Java servers.

    Still, I'm quite comfortable continuing my Java development work. My focus in computing life has always been the server, though I did spend several years on client-side programming as well. While client-side GUI programming is fun, it's also far more time consuming and tedious. I find server-side coding and the performance tuning aspects of it are far more entertaining and challenging. (You can write shitty client code and get away with it because the load is distributed, but if you write shitty server code you have thousands of cranky users, not just a few who's devices are underpowered.)

    --
    I do not fail; I succeed at finding out what does not work.
    1. Re:So much for "new" technology by msobkow · · Score: 0

      "whose devices", not "who's devices"
      -- The self-deprecating grammar nazi :P

      --
      I do not fail; I succeed at finding out what does not work.
    2. Re:So much for "new" technology by Desler · · Score: 1

      Ruby is 17 years old just so you know.

    3. Re:So much for "new" technology by Megane · · Score: 1

      But does anyone really use Ruby off rails?

      --
      #naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
  30. Re:Buffer overflow by The+Evil+Atheist · · Score: 2

    Yes. It's called the Standard Template Library. C++ has them and should be used. There's hardly any excuse not to use them, especially now that C++ will get move semantics which can increase performance of the containers by an order of magnitude.

    --
    Those who do not learn from commit history are doomed to regress it.
  31. In Other News... by Anonymous Coward · · Score: 3, Funny

    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.

    1. Re:In Other News... by vlm · · Score: 4, Funny

      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...

      --
      "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
    2. Re:In Other News... by Anonymous Coward · · Score: 0

      Rototiller => FORTRAN
      Does one thing very, very well in the garden. Absolutely the wrong tool to use in any other situation.

    3. Re:In Other News... by Anonymous Coward · · Score: 0

      I'd say the Table saw is PHP - it can only do one thing, and it's dangerous even for that, but lots of amateurs think they can do all sorts of clever things with it and always end up with spectacular failure.

    4. Re:In Other News... by Anonymous Coward · · Score: 0

      Small, pretty hammer with gold leaf and sparkly bits - obviously python. It does exactly the same job as perl, but takes longer (due both to the lower weight and to the sheer distraction to the operator caused by the wondrous aura it emits).

  32. The method by Hentes · · Score: 1

    Here is their detailed method. It's far simpler than it claims to be, basically just summing up the search results for a particular language. I couldn't find any mention of the "number of skilled engineers world-wide, courses and third party vendors". Also, there are some shortcomings such as excluding AJAX hits from Javascript and Rails hits from Ruby, the reasoning behind that not being convincing. Still, this list is similar to other comparisons using search results, and i don't think we will invent a method better than that soon.

  33. Re:Buffer overflow by Anonymous Coward · · Score: 0

    Because we can't trust programmers to be smart enough to avoid these conditions...?

    Well, obviously we can't.

  34. Re:Buffer overflow by Artraze · · Score: 5, Insightful

    Given the prevalence of SQL injection attacks, which could be prevented with a single function call, I have to say that buffer over-(and under-) flows are really a red herring. Unless a language makes it literally impossible to write insecure code, lazy and bad programmers will find a way.

  35. flawed data? by Anonymous Coward · · Score: 0

    Github thinks my Python web projects are mostly Javascript because I stuck dependencies like JQuery in the repo.

    1. Re:flawed data? by Anonymous Coward · · Score: 0

      Ever heard of submodules? Methinks you're doing it wrong.

  36. If you are going to combine by Anonymous Coward · · Score: 0

    Two separate languages to make a more impressive total I say java is still on top: Java/VB = 32%

  37. Re:Buffer overflow by Anonymous Coward · · Score: 1, Funny

    Sure. As soon as someone comes up with a language that produces code that runs half way as fast as C on any OS, and that at least pretends to integrate with the rest of the OS. You know, make it nice for everybody else other than developers. Oh, here's a though: how about developers get their heads out of their butts and learn how to be programmers, instead of whining that real languages don't do everything for them?

    Switch to Windows. C# and .NET do in fact run at least "half way as fast" as C and integrates with the rest of the OS fine.

    In any case, excluding a managed language on the grounds that it is not fast enough sounds like premature optimization to me. Might as well start off writing it all in assembly, since compilers don't always produce the fastest possible code.

  38. Re:Buffer overflow by cowdung · · Score: 4, Insightful

    A pocket knife doesn't implicitly create objects or fail to cleanup if you forget to make your destructor virtual.

    C++ has very complex rules that take years to hone and understand correctly, and even then mistakes are easy to make. The proof is that even today when you go to C++ forums people are still asking about obscure language rules while in Java forums the conversation has moved on to issues of design. Nobody needs to discuss the meaning of language constructs in Java because they are obvious.

    It isn't however obvious that an error in your cannonical class definition could cause this code to create a memory leak:

    a = b;

    Clearly proper use of a tool is important. But tools without safety features are more likely to cause accidents.

  39. Readable C? by waterbear · · Score: 2

    C is awesome incarnate: lean, readable and full of low level goodness.

    C can be readable .... if the programmer has kept to a reasonable kind of discipline and order in the coding, that is. (FTFY)

    Obfuscating C can be as hard to read as old 'spaghetti Fortran', I think.

    -wb-

  40. Re:Buffer overflow by Imagix · · Score: 4, Informative

    now that C++ will get move semantics

    Not will, _has_ move semantics. As of last August.

  41. iOS, games, etc ... by perpenso · · Score: 0

    64-bit hardware doesn't require reworking old apps, most 32-bit apps will run just fine as is. Unless you need more memory than your 32-bit environment can provide I doubt many 32-bit apps are being revisited.

    Games are an area where C/C++ has always been strong, one needs the performance, except possibly for casual games.

    iOS is another thing that may contribute to increased C/C++ usage. When you target iOS you have to use Objective C, this is what the iOS API uses. However there is no problem using C/C++ code in the non-user interface portions of your code. For example in an iOS calculator app (rpn, scientific, statistics, business, hex) the user interface code is all Objective C but all the handlers for the button presses and all the math is in C/C++. This makes porting and testing easier. With respect to testing I can build regression and fuzzing test apps for the Linux console that include the button handlers and math code, these test apps then simulate button presses and check "displayed" results and various calculator registers (stack, memory, special purpose, etc).

    And of course there is the combination of the two. iOS games. The core of the game itself should be written in C/C++ for performance and portability.

    1. Re:iOS, games, etc ... by Anonymous Coward · · Score: 0

      It's not just about needing more memory. Lots of 32-bit apps made/make lots of assumptions about data type sizes, such as default int size, that can cause issues when moving to 64-bit. You've not worked with much legacy code if you think most apps will run just fine as is.

    2. Re:iOS, games, etc ... by w_dragon · · Score: 2

      That's only if you recompile in 64 bits. If you take the 32-bit executable and just run it on the 64-bit OS it should work fine. You can even continue compiling in 32-bit mode on a 64-bit OS if you want, so long as you don't want more than 2GB of memory everything should be fine.

    3. Re:iOS, games, etc ... by perpenso · · Score: 1

      It's not just about needing more memory. Lots of 32-bit apps made/make lots of assumptions about data type sizes, such as default int size, that can cause issues when moving to 64-bit. You've not worked with much legacy code if you think most apps will run just fine as is.

      Actually I am quite familiar with moving code between 32-bit and 64-bit environments (and gag, 16-bit in the distant past), between CPUs with different byte orderings etc. You are assuming the legacy code is being recompiled as a native 64-bit app. That is rarely the case. Running the old 32-bit binaries, or if maintenance is still being performed then continuing to generate 32-bit binaries, is far more likely. Unless you are hard up for more RAM there is rarely any benefit to porting the code to 64-bit. The performance gains are likely to be marginal. And the legacy app's run-time performance is likely to be just fine, running faster than every just because of the hardware improvements since it was originally developed. Modern 64-bit OS environments run their legacy 32-bit apps just fine.

    4. Re:iOS, games, etc ... by ckaminski · · Score: 1

      Actually, converting from 32 bit to 64 bit alone will probably HURT you performance-wise. The memory paths get twice as wide, and caches hold 1/2 as much. If your ints/longs grow to 64bits you're simply fucked.

      Moving Pro/ENGINEER from DEC OSF/1 32bit to 64bit cost us 10% in raw performance (this was back in 1994/1995). Same hardware, same OS (64-bit). Notably, we didn't ship many 64bit OSF systems (or MIPS/SGI or Solaris). Until 1997/1998 the systems just didn't exist for desktop usage, and by then Windows was dominating. SGI was probably the only platform where any of our customers HAD more than 4GB of RAM.

  42. Logo by teg · · Score: 1

    The list in the article isn't the same as in the submission... there is no trace of cold fusion, but there is Logo(!... !!!!) in spot 19. Is there something that would explain why the moving turtle of my childhood can be found on such a list?

    1. Re:Logo by Anonymous Coward · · Score: 0

      Actually, CFML, which is ColdFusion is ranked 49th.

    2. Re:Logo by Rufty · · Score: 1
      --
      Red to red, black to black. Switch it on, but stand well back.
  43. could these numbers be any softer? by Anonymous Coward · · Score: 0

    Based on the "number of skilled engineers" as evaluated by a scraper.

    Tell me again about the tenths of a percent.

  44. Re:Buffer overflow by Skapare · · Score: 1

    Can we please adopt programmers that are not susceptible to writing bad code? It's really pathetic that after all these years, that's still a huge cause of security issues.

    --
    now we need to go OSS in diesel cars
  45. Re:Buffer overflow by Anonymous Coward · · Score: 0

    totally agree, learn to program, learn to debug, and write read software.

  46. Re:Buffer overflow by Junta · · Score: 5, Insightful

    Might as well start off writing it all in assembly, since compilers don't always produce the fastest possible code.

    Actually, things are advanced to the point where with very rare exception a human writing assembly is almost certainly not going to produce the optimal approach anymore. First, compliers represent the result of the best and brightest and trial and error for optimizing code structures into streams of assembly that are frequently counter-intuitively faster than a person is likely to think of on their own. Secondly, prcossor manufacturers tend to get their latest and greatest instruction sets into compilers, and trying to keep up with those dynamics would be implausible for a human writing special purpose code.

    So manually writing in assembly is no longer always faster in practice and in fact usually slower. I don't think the same claim can be made of any particular managed language compared to C/C++.

    Although I will agree that language choice *usually* matters far less than algorithmic choices and occasionally people jump to a language change in a project to alleviate slowness only to end up not significantly better than they started because of glaring design problems that dwarf the language performance concerns.

    --
    XML is like violence. If it doesn't solve the problem, use more.
  47. Re:Buffer overflow by KGBear · · Score: 2

    No matter what the question is, "switch to a different OS" is never the correct answer. People should be able to pick the best OS for the job, as well as the best language for the job. C# and .NET integrate well with Windows because they don't run on anything else. I would rather have options. And the term "premature optimization" is a good example of the kind of idiot that writes code these days. Not doing what you call "premature optimization" is what I call being sloppy. Being lazy. Do it right in the first place so you don't have to do it again.

  48. Re:Buffer overflow by dremon · · Score: 1

    Java is not exactly issue-free as well. For example lack of comparison operator for strings forces a programmer to abandon an intiutive ways of doying things and to always remember to follow the language obscure rules. Same for unsigned bytes and integers. Same for resource leaks and forgotten "finally" blocks.

  49. Java is poor for memory-intensive codes by j.+andrew+rogers · · Score: 5, Interesting

    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.

    1. Re:Java is poor for memory-intensive codes by medv4380 · · Score: 1

      If you're having a memory bottle neck between RAM and CPU then you need to upgrade to a quad channel mother board. Cache lines can be an issue because object padding doesn't work as well in Java as it does in C and C++. However, if you're coding to the cache line size and you get a CPU with more of less cache then you originally coded for you end up with unpredictable performance issues. At that point just tear out the cache. The Wii U is using an processor that has the Ram on the CPU to give the highest bandwidth possible. Try coding to cache lines when you don't have l1 limits. I'd expect anything like a server to have a significant portion to be written in native code because you'll have access to things that a language like Java just wont have. Like CPU affinity. As far as I'm concerned all the current languages are lacking a good clean way to write concurrent or parallel code. Sure they all have something but they end up looking like old spaghetti code when they are used for anything major.

    2. Re:Java is poor for memory-intensive codes by gbjbaanb · · Score: 1

      you need to check out OpenMP, or Intel's thread Building Blocks for ways to make your thread code look nice.

      the trouble with "quad channel memory" is that you're just trying to scale up rather than out (ie you've shifted the goalposts, but they're still thee to catch you later as you use up more memory bandwidth). With server and cloud apps, you need to reduce your bandwidth consumption, as it means you then can use fewer servers and less expensive electricity. The days where we could just say "it's ok, buy a bigger server" or "next year we'll have enough computing power" are over. We now have to do more with what we've got, and that means more efficient programming.

      This also applies to the 'desktop' too, as our desktops are increasingly mobile.

    3. Re:Java is poor for memory-intensive codes by OrangeTide · · Score: 1

      It's cheaper to fire your Java developers and hire C developers than to replace all the servers in your cloud.

      --
      “Common sense is not so common.” — Voltaire
    4. Re:Java is poor for memory-intensive codes by msobkow · · Score: 1

      Until you're stuck trying to debug the memory leak in your C/C++ code because the server won't run more than 2 hours without barfing.

      The best solution is to be language agnostic and use what is best suited for the task at hand. Unfortunately most companies are more interested in a one-language-fits-all approach nowadays because they think it "simplifies" the system and reduces the complexity. Unfortunately, once you start implementing workarounds for language constraints, you soon realize that big complex systems require big complex code no matter what language is used.

      It's just a matter of which complexity vs. functionality trade-offs you're willing to eat with your project budget. You can have a million lines of C code full of function pointers and struct overlays that is hard as hell to understand and debug; you can have 100,000 lines of C++ code that generates inferred objects from templates without your control producing a binary as big as the million lines of C; or you can have 50,000 lines of Java that eliminates the majority of constructor/destructor code that is the most common cause of memory leaks.

      Any one of the above will do the job. The question is what skillsets do you have available and how much time do you have to deal with the inevitable bugs that creep in no matter which language/approach you've chosen.

      Choose wisely. Because when the bugs inevitably arise, proponents of some other language or framework will be quick to roast you and try to have you turfed as incompetent for making a different choice than they would have. Not a "wrong" choice, but a different one.

      --
      I do not fail; I succeed at finding out what does not work.
    5. Re:Java is poor for memory-intensive codes by TemporalBeing · · Score: 1

      It's cheaper to fire your Java developers and hire C developers than to replace all the servers in your cloud.

      Unfortunately that has been the Java mantra for years. Have a performance issue? Upgrade the hardware.

      Interestingly, the mantra broke when Intel/AMD started doing multi-core as the initial multi-cores were each rated at about half the rate of the combined rating (e.g. 2 700MHZ processors to achieve a 1400MHZ combined processor). Java just didn't add up any longer in that sense.

      Yes, there are uses for Java, but performance is not one of them. Any time you need performance you need an efficient language without garbage collection. C# suffers the same issue.

      --
      Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
    6. Re:Java is poor for memory-intensive codes by dkf · · Score: 2

      The days where we could just say "it's ok, buy a bigger server" or "next year we'll have enough computing power" are over. We now have to do more with what we've got, and that means more efficient programming.

      The days of the hardware being trivially the source of all speedups required are long gone. Also long gone are the massive shared memory machines; they really didn't scale without the use of enormous amounts of money and that never really changed (the real cost of supercomputers back at around 2000 was in the funky backplane interconnect). Now, we have to learn to do more with message passing (that scales far better, in many ways) and we need to learn to only pass around the data that's necessary (because such communications cost).

      The "downside" of this is that all those programmers who decided that parallel programming was all about throwing shared memory and threads at a problem before sprinkling in locks to stop things crashing, well those programmers' skills are pretty low value now. The tech they picked can't ever scale up or out. People used to network programming are in a better position; after all, that's clearly about true asynchronous coding...

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    7. Re:Java is poor for memory-intensive codes by Tyler+Durden · · Score: 2

      Until you're stuck trying to debug the memory leak in your C/C++ code because the server won't run more than 2 hours without barfing.

      And if you hire the right developers, that never happens in the first place. Don't believe me? Consider all of the countless OS kernels, embedded devices and games developed in C or C++ that run without a hitch.

      Hell the only places where C/C++ coded servers barf in 2 hours are in the fevered imaginations of Java programmers who think managing your own memory is soooooooooo hard.

      --
      Happy people make bad consumers.
    8. Re:Java is poor for memory-intensive codes by Anonymous Coward · · Score: 0

      There is no driver away from Java to C++. This is a common conceit of C++ programmers but it's false. Java is being bled by other higher-level languages, not C++. One one hand, performance is becoming less of an issue, not more, and on the other, the JVM has made huge bounds in catching up with C++ in terms of performance.

    9. Re:Java is poor for memory-intensive codes by msobkow · · Score: 1

      Bullshit. I spent over 12 years on C++ projects. Everyone screws up something, somewhere, sometime.

      I've since spent almost 15 years with Java.

      Guess what? Java is a hell of a lot easier to debug.

      I've done more cross-language support with C code and C++ wrappers than you can ever grasp with your feeble little mind.

      --
      I do not fail; I succeed at finding out what does not work.
    10. Re:Java is poor for memory-intensive codes by angel'o'sphere · · Score: 1

      Funny that you get modded to +5.

      All your points are wrong (except perhaps the last, can not jude what you are doing/experiencing there).

      E.g.: the GC in java is concurrent since ages and does not introduce latency.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    11. Re:Java is poor for memory-intensive codes by angel'o'sphere · · Score: 1

      Most games crash after playing 10h or longer.
      As I'm not debugging them I assume they have memory issues.

      Hell the only places where C/C++ coded servers barf in 2 hours are in the fevered imaginations of Java programmers who think managing your own memory is soooooooooo hard.

      This is a pretty stupid comment. Memory management is hard. If you claim otherwise you are not programming long enough or did no real programming.
      Java programmers likely have no idea at all about memory management, which makes your comment even more stupid.
      It is like claiming that a skipper on a sailing boat is sailing because he is to stupid to start the engine of a motor boat.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    12. Re:Java is poor for memory-intensive codes by Anonymous Coward · · Score: 0

      Until you're stuck trying to debug the memory leak in your C/C++ code because the server won't run more than 2 hours without barfing.

      And if you hire the right developers, that never happens in the first place. Don't believe me?

      This whole "well only hire AWESOME programmers" argument makes about as much sense as replying with "yo mamma." In the real world, companies get to hire actual people, not the theoretical ones that never screw up, the one you dream about being. In the real world, for any project larger than a few dozen people - and that is pushing it - you will have at least one programmer who is merely adequate. In C/C++ a single bad programmer can destroy all performance wherever his code is running by simply requesting (and getting) all the memory he wants. while(true){do something idiotic and malloc(lulz);}... and you're done.

      Consider all of the countless OS kernels, embedded devices and games developed in C or C++ that run without a hitch.

      Most games, modern or otherwise, crash incessantly or have ridiculous glitches if you know what to do to trigger them. Have a look at TASVideos.org if you're of the classic console mindset. For more recent adventures, I present, in no particular order:
      The GTA 4 swingset of doom ,
      This, dear lord this http://mimg.ugo.com/201006/49442/cuts/tigerwoods_288x288.jpg ,
      Rockstar's donkey lady experiments http://www.youtube.com/watch?v=7q7v4F8r9Og , ... and every crashtastic Gamebryo derivative (FO 3, FO:NV, Elder Scrolls)

      Also consider why you can put an unpatched Win9x box on the internet and it gets pwned in a mean time to failure that is less than the time it takes to install the patches.

      Hell the only places where C/C++ coded servers barf in 2 hours are in the fevered imaginations of Java programmers who think managing your own memory is soooooooooo hard.

      It isn't though. If it wasn't a problem there wouldn't be leak detection frameworks.

    13. Re:Java is poor for memory-intensive codes by Tyler+Durden · · Score: 1

      Games are a pretty special case since they are developed to the bleeding-edge of hardware under time-crunch constraints. Given the importance of performance in these cases, a crash in 10 hours of play is a fair trade-off. The OS kernel and embedded system examples that you and everyone else ignored can be developed in a much more reasonable timeframe and work fine 99% of the time.

      Any Java programmer worth his salt should have some awareness of memory management. And if he doesn't how can he evaluate the trade-offs considered when choosing between C++ and Java? Counter to what everyone else would like to believe, there are still places where manual memory management is preferable. The original poster for this thread gave a great example. Shit, half of Java developers don't even realize that most objects you use in C++ are either allocated on the stack or are managed with the STL and don't even need to have their memory tracked by the programmer.

      Besides, Java can leak memory. So I get to choose between a language that claims it takes care of everything for me and then realize later that, oops, there's some fiendishly hard memory leak I have to find. Or I could just go with C++ where I know all of the possible pitfalls to look for in the beginning. Being able to predict when each object is released in memory, allowing the destructor clean-up to happen within the object itself without the finally-block kludge can (quite frankly) be a God-send in certain scenarios.

      --
      Happy people make bad consumers.
    14. Re:Java is poor for memory-intensive codes by ADRA · · Score: 1

      I forget if it ever got implemented or not yet (maybe in Java 8) they were removing method scoped variables from the heap allocation which makes a billion little heap allocations (and hence fewer and simpler GC's) events a lot more tolerable.

      Plus, coming from a long time convert to Java, once you've coded Java for a while, you have to be pretty off your rocker to make actual memory leaks. I mean really really off your rocker. There are times that caches stick around much longer, or you have an engrossing singleton floating around because a newbie doesn't understand anti-patterns but by and large that is a NON-PROBLEM. I've spent maybe 10 minutes this year thinking about memory management, firstly because I don't have the same performance pressure that most C/C++ programs seems to require (you guys are all nuts or game/embedded developers), and second because it is soo hard to actually cause hard-links to data you expected to throw away.

      --
      Bye!
    15. Re:Java is poor for memory-intensive codes by Tyler+Durden · · Score: 1

      Plus, coming from a long time convert to Java, once you've coded Java for a while, you have to be pretty off your rocker to make actual memory leaks. I mean really really off your rocker.

      I'm not so sure about that. I've heard from very experienced Java programmers who get bit by this on occasion because of something subtle.

      But, if by chance you do find preventing references to objects from remaining around longer than you expect trivial to avoid memory leaks in Java, then you will find memory management in C++ equally trivial. Just apply the same principle to smart pointers.

      --
      Happy people make bad consumers.
    16. Re:Java is poor for memory-intensive codes by codepunk · · Score: 1

      "Besides, Java can leak memory"

      Shhhh, java jocks, call them resource leaks.

      --


      Got Code?
    17. Re:Java is poor for memory-intensive codes by angel'o'sphere · · Score: 1

      The question is how do you define memory management.

      In C++ you manage memory and your objects. In Java you only manage your objects.

      In other words the way how you treat them is depending on your use case or on the business requirements.

      As a simple example, someone is adding items to a shopping card. All items are "allocated" with 'new' and the reference/pointer is added into a list inside of the shopping card object. Also the 'same' item could be on a wish list. The customer changes his mind and removes the item from the shopping card.

      In Java you only remove the item from the card, and adjust the list in the shopping card accordingly. That means the list object will set the particular reference to null. And I still have the object lying around. Until it gets GCed ... which is fine, as I have not to worry about the same object inside of the wish list.

      For me, according to my book, this has nothing to do with memory management. I don't see or care or even work in any way with the resource: memory.

      In C++ this is different. Very often I'm working with memory directly, or very often I jave to chose the correct smart pointer implementation for my particular use case.

      Or I could just go with C++ where I know all of the possible pitfalls to look for in the beginning. Being able to predict when each object is released in memory, allowing the destructor clean-up to happen within the object itself without the finally-block kludge can (quite frankly) be a God-send in certain scenarios.

      The learning curve for C++ is what? 10 years? Sorry, I programmed nearly 15 years in C++.
      And I never have met anyone who did not have memory bugs during development time and spend accordingly lots of time (perhaps 30% or more of the development) in the debugger fixing bugs he made himself. So yes, if you know every pitfall and have the disciplin to avoid them and can develop in C++ smoothly and fast nice code, then go for it.

      I stopped around 2000 working with C++ for various reasons: no standard portable gui library (only a few opensource very bad libraries which basically are modeled after Windows MFC), except for Qt now, no introspection/reflection/serialization. No really working networking, ORBs and their IIOP implementations basically never did actually interoperate. No standard for multi threading etc.
      And worst of all: very very limited support for refactorings.

      Basically lots of stuff was "implementation dependend" or up to the vendor if they implemented it at all.
      Frankly: I would not wonder if the old definition size_of(char) = size_of(short) = size_of(int) = size_of(long) is still how C++ defines its sizes of primitives.

      Sure, Java has a lot of drawbacks. Missing unsigned types and bit-fiddeling shifts/rotates and masking in bits in and out is super annoying. No real templates.

      However lots of claims "typical" C++ programmers make are simply untrue. Especially when they say stuff like: I like to program on the bare metal. Because they don't know what actually the compiler is doing for the ...

      Most Big Java applications are io bound, the big irons we run them on usually have a terra byte of main memory, 256 cores. Most of the time all cores are on less than 1% throughput. The memory they use is not because poor Java programmers can not manage memory, but because the datasets are that huge. And more important: the wrong technology is chosen. Instead of ranting over if C++ is better than Java, and in wich cases I would challenge why an in-house application needs to use SOAP!?

      Anyway, just some thoughts ;D

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    18. Re:Java is poor for memory-intensive codes by ADRA · · Score: 1

      I'm sure you're more or less correct in regards to smart pointers, but with one caveat. In Java, circular dependencies (regardless of how nested) will always be GC'd eventually unless they're hard linked to a heap object hard-linked to a working area on a live thread. We don't care about crazy inter-dependencies that would normally cause reference counter based pointers to leak.

      In Java, you really really don't care about how memory gets allocated and removed unless you're doing very non-trivial performance sensitive work, which is generally not the case when one chooses Java as a starting platform to work in. That said, More vetrain programmers will be able to mitigate most bottlenecks relating to object construction/deconstruction with various techniques (constants, reusable 'hold' objects, weak references for well behaved caching, only allocating objects when they're really going to be used, etc..). Nothing here is specific to java, but you just have fewer avenues as a developer to micro-optimize or shoot your foot off, which has and always will be the Java tradeoff.

      --
      Bye!
    19. Re:Java is poor for memory-intensive codes by OrangeTide · · Score: 1

      Yea, well I had to debug and fix memory leaks in Java code at Cisco and Amazon even though I was a C developer on the kernel system (aka System Software).

      You can take your vague analogies and go pound sand.

      --
      “Common sense is not so common.” — Voltaire
  50. Nobody likes PHP by concealment · · Score: 1

    I think the trend is just beginning. I'll grant you that this is currently speculative and is based more on trends I've seen in a highly responsive section of the economy as far as technology is concerned.

    As much as I am not a big fan of PHP, I'm going to stand up for it. No one with a computer science background seems to like it, but it's a good general purpose tool. If you're going to put up a web application and it just needs to work and do so quickly, PHP is how most people will do that, especially the self-taught.

    I'm not in denial of its many problems, including slowness and security issues. I don't want to code in it ever again. But it's a good general purpose web templating language.

    1. Re:Nobody likes PHP by Anonymous Coward · · Score: 1

      I'm curious how much of php's popularity and rankings has to do with facebook.

    2. Re:Nobody likes PHP by Bigbutt · · Score: 1

      The problem seems like everyone wants to knock PHP but not provide an alternative that's somewhat easy to use. I'm a self taught programmer starting with Color Computer BASIC back in the early 80's. I've programmed in several different types of BASIC and then C. I tried C++ but didn't like it, although I liked the ideas. I've also done lots of scripting and Perl. Now I'm doing pretty well with PHP scripting having done a bunch of personal type coding over the past 4 years or so. I did poke at python 15 years ago but was working a lot with perl and they seemed to be two camps; perl or python. And since perl was on all our systems, that's about as far as I got.

      I found this: http://wiki.python.org/moin/PythonVsPhp

      But the comparisons really don't give me a good reason to go to python, heck some of them are even reasons not to move such as it's a general scripting language (like perl) vs a web specific one and I need to use modules to write web code (same as perl).

      So, is there another language I should be looking at? If I'm going to go with a general purpose type scripting language, why not perl which I'm already pretty familiar with?

      [John]

      --
      Shit better not happen!
  51. Re:Buffer overflow by Viol8 · · Score: 1

    "Switch to Windows. C# and .NET do in fact run at least "half way as fast" as C and integrates with the rest of the OS fine."

    Does it? Well good luck writing a low level device driver in C# in that case,.

  52. Re:Buffer overflow by Dishevel · · Score: 2, Interesting

    A pocket knife doesn't implicitly create objects or fail to cleanup if you forget to make your destructor virtual.

    C++ has very complex rules that take years to hone and understand correctly, and even then mistakes are easy to make

    I am not sure why you do not understand this but....
    Idiot programmers are idiots.
    We need good programmers. Programming IS complex. It needs to be. There is not a language that is flexible, powerful, fast and will wipe your fucking ass.
    Pointing out that your experience in forums is crap.
    What you see in C++ forums is what you are looking for. Same with Java.
    Java doesn't have obscure commands because it can not do anything obscure.
    Just because you are comfortable in Java and are clueless when it comes to C++ says nothing about the languages.
    When you start working on some real machines in environments that just get shit done you will see C, C++, Perl, Assembly and shell scripts.
    Then you will start looking around and notice PHP shit and Java and bits of shit all over.
    In all of that you will see crap coding and good coding. If you can not code well you can go play with with languages that are weak and slow but may allow your shit code to run. But when someone else looks at your code they will still see that it is in fact, Shit.

    --
    Why is it so hard to only have politicians for a few years, then have them go away?
  53. Re:Buffer overflow by Anonymous Coward · · Score: 1

    Except in Java, in practice, despite all of it's fancy features, still has all of the same problems A C/C++. No language will let any programmer gloss over the fundamentals.

    The Java programmers really should still be asking the hard/unusual questions, but they've got some half-baked tools to plaster over the issues. The end result is a bunch of smug programmers that make the same basic mistakes, generating code of no greater quality but far worse speed. - Honestly, doesn't that remind you of ever Java project, ever?

  54. Re:Buffer overflow by JAlexoi · · Score: 2

    Java is not exactly issue-free as well. For example lack of comparison operator for strings forces a programmer to abandon an intiutive ways of doying things and to always remember to follow the language obscure rules.

    String is an object. All objects are to be compared using equals method. It's not obscure by far. Compare that most C++ queries.
    If you want a good obscure Java language requirement, it's the fact that arrays are objects and essentially don't have a functional equals method(you have to use java.util.Arrays).( So next time you post this, at least you'll have a good example)

  55. Re:Buffer overflow by tibman · · Score: 0

    Not sure how you shoved Perl into "get shit done" and PHP into "shit". Both are equally awesome and terrible. Depends on the programmer.

    --
    http://soylentnews.org/~tibman
  56. Re:Buffer overflow by Anonymous Coward · · Score: 0, Insightful

    Everyone that isn't me is an idiot and a bad programmer. I know everything. Watch as I beat my chest for 10 lines.

    What a bunch of drivel.

  57. Re:Buffer overflow by Waffle+Iron · · Score: 4, Insightful

    ...And as with most language standards standards, that actually means that a developer can safely begin to use the new feature in portable code starting around the year 2025.

  58. Re:Buffer overflow by JAlexoi · · Score: 1

    Niope! And there are a lot of HFT platforms to prove you're wrong.

  59. Re:Buffer overflow by RaceProUK · · Score: 1

    You write the C# -> native compiler first ;)

    --
    No colour or religion ever stopped the bullet from a gun
  60. Cant Java... by unixisc · · Score: 0

    Can't an entire OS, including drivers and everything, be written completely in Java, w/o involving C or C++ at all?

    1. Re:Cant Java... by interval1066 · · Score: 1

      Sun threatened us with a Java OS for years. Now that Oracle owns the tribe, well... don't hold yer breath.

      --
      Python: 'And then suddenly you have a language which says "we're all stuck with whatever the whiniest coder wants".'
    2. Re:Cant Java... by Imagix · · Score: 1

      What are you going to write the Java VM in?

    3. Re:Cant Java... by s73v3r · · Score: 1

      I seem to recall hearing about some ARM processors that actually have hardware support for Java bytecode.

    4. Re:Cant Java... by unixisc · · Score: 1

      Why not in Java itself? While the first C compiler ever may have been written in assembly, subsequent ones were written in previous versions of C. Similarly, while the first Java VM, compiler and everything may well have been written in C or C++, I don't see why subsequent versions of Java couldn't have been written using the previous versions of Java.

      What exactly am I missing? (Disclaimer: I'm not a programmer nor a software engineer)

    5. Re:Cant Java... by unixisc · · Score: 1

      Yeah, what ever came of that? And while on the subject, what ever happened to the various Java CPUs that were contemplated at one time - picoJava, microJava and ultraJava? It would have been neat to have the Java VM made into a RISC CPU w/ Bytecode as the instruction set (speaking of that C to SoC project that was discussed on /.) And a Java OS, which would have essentially been the OS for Java apps and applets to run on would have been fantastic.

      Sounds like a good project for someone doing his thesis in an university that's not wound up its CS department.

    6. Re:Cant Java... by Imagix · · Score: 1

      Java doesn't get compiled down to machine code. It gets compiled into an intermediate bytecode which then needs to get interpreted by a Java VM. Yes, that Java VM may do some cool stuff like JIT compiling and such. So if your Java VM is written in Java... that Java VM must itself be run within another Java VM. What's the second Java VM written in?

    7. Re:Cant Java... by Darinbob · · Score: 1

      Yes, but you're going to have to swap back to ARM to do some of the stuff the VM and RTL needs, just like you have to drop back to assembler when using C for that stuff.

    8. Re:Cant Java... by TemporalBeing · · Score: 1

      What are you going to write the Java VM in?

      You can't write device drivers and such in Java, at least not without escaping to Assembly if not C/C++. Java just lacks the basic functionality and capability to do so, but so does any other VM'd language (e.g. Python, Perl, etc.) - it's the nature of running in a virtual machine, along with the performance penalty for doing so as well.

      --
      Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
    9. Re:Cant Java... by kevingolding2001 · · Score: 1

      It's Java VM's all the way down.

    10. Re:Cant Java... by ADRA · · Score: 1

      Um, each Java thread runs independently, and in The oracle JVM they're OS threads, so assuming that one wrote 'JavaForKernel' module extensions (and a shared runtime hook), there's no reason why it wouldn't be feasible for Java or a java like language to be used in the kernel. That said, its a horrible horrible idea as a result of performance and memory management overhead and bloat, but it would be a neat idea to be able to debug drivers on the fly instead of performing black rites to get C debuggers working nearly as effectively as Java ones do out of the box.

      --
      Bye!
    11. Re:Cant Java... by TemporalBeing · · Score: 1

      Um, each Java thread runs independently, and in The oracle JVM they're OS threads, so assuming that one wrote 'JavaForKernel' module extensions (and a shared runtime hook), there's no reason why it wouldn't be feasible for Java or a java like language to be used in the kernel. That said, its a horrible horrible idea as a result of performance and memory management overhead and bloat, but it would be a neat idea to be able to debug drivers on the fly instead of performing black rites to get C debuggers working nearly as effectively as Java ones do out of the box.

      The issue is not whether you could push Java into Kernel space. I agree that could be done though it would be a horrible idea for performance/etc.

      The issue is that Java does not provide the facilities itself for talking to hardware like C/C++ and Assembly do. It's facilities to do so are escapes to C and Assembly in a similar manner to how C++ escapes to C and C/C++ escape to Assembly.

      So, you could ulimately write a Kernel in Java is feasible, you'd still need support from C/Assembly to actually make it interact with the hardware.

      --
      Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
    12. Re:Cant Java... by Uberbah · · Score: 1

      Any particular reason you skipped over:

      1. IIS having more exploits than Apache despite Apache's superior marketshare
      2. Why the number of exploits for Windows 7 hasn't begun to surpass the number of exploits for XP as it replaces it's predecessor in marketshare.
      3. The fact that Windows operating systems ran all programs with super user access, left ports and services open all over the place, and tied scripting & a web browser into the operating system.

      Imaginary Ford Executive, circa 1980: "There's no design flaw with the Pinto! The only reason you hear about the Pinto's gas tank exploding in 10 mph collisions and not from Honda is because Ford has such great marketshare. If Honda were in our place, you would be hearing about the same sort of exploding gas tank problems with Accord!"

    13. Re:Cant Java... by interval1066 · · Score: 1

      Didn't skip it, There's a reply right there under yours. And I'll quote myself: I'm no microsoft booster. And YOU don't address the marketshare % I quoted, whch is plain fact. and my point.

      --
      Python: 'And then suddenly you have a language which says "we're all stuck with whatever the whiniest coder wants".'
    14. Re:Cant Java... by Uberbah · · Score: 1

      Didn't skip it

      Other than all the central points I just re-iterated.

      And YOU don't address the marketshare % I quoted

      Sure I did. If marketshare % is the problem - as opposed to design flaws - then why did IIS have more exploits than Apache with less marketshare. Why have the number of exploits for Windows 7 not caught up to the number of exploits for XP as Windows 7 has replaced it's predecessor in marketshare.

      Apple ships between 5 and 10 million computers a year. The greater marketshare of Windows may indeed explain why it gets attacked more often - but it doesn't come close to explaining why OS X has never had a problem that has come close to Code Red, just to name one example. Or why there is not a single Mac botnet out there, despite tens of million of Apple machines running around the world.

      That's because, to borrow Clinton's old line about the economy: it's the design flaws, stupid.

  61. Re:Buffer overflow by rev0lt · · Score: 2

    Errors != security issues. Buffer overflow and underrun errors are serious issues (mostly mitigated by modern libraries and safer coding practices), but security issues that arise from them are mainly the OS fault. 1:1 mapping of code and data segments is dumb securitywise. It's not we were lacking in linear address space in popular architectures all these years (today maybe). Long story short - the shortcomings of a given language are only a part of the shortcomings of the whole system.

  62. Rankings based on numbers pulled out of...air by tomhath · · Score: 1

    the ratings are based on the number of skilled engineers world-wide, courses and third party vendors. The popular search engines Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings.

    This doesn't give much to go on, but I suspect you could adjust the algorithm to give different results pretty easily.

  63. Re:Buffer overflow by Imagix · · Score: 2

    Get reasonably recent compilers. GCC 4.3 already had some of the C++11 stuff implemented, as did Visual Studio 2010. Move up to GCC 4.7 and Visual Studio 11, and you get more complete C++11 implementations (as well as Clang).

  64. Re:Buffer overflow by sympletun_1997 · · Score: 3, Interesting

    For the record, this has been true for a couple of decades. There are only a small number of cases where writing assembly can produce better code, and most of those have to do with application-level semantics that can harness register data to get better results. One example of this is bignum math, where it's frequently useful to sample the carry flag to optimize sequential addition. Even here, however, this effect is usually achieved by compiling the C code to assembly and then hand-optimizing only the smallest portion of the code to use the carry/borrow flag.

  65. Re:Buffer overflow by man_of_mr_e · · Score: 1

    While, technically true that the compiler can almost certainly optimize code as good, if not better than most developers. It still has to optimized the actual code written, which may not be as efficient.

    People tend to use libraries for everything in higher level languages. And those libraries are typically filled with code that's not necessary for the specific job being accomplished.

    In general, you are better off with this, since the library code is debugged and well designed. So programs are typically filled with well written, well designed "average use case" optimized algorithms.

  66. Re:Buffer overflow by Walterk · · Score: 1

    compliers represent the result of the best and brightest and trial and error for optimizing code structures

    Clearly you haven't used the Intel C++ compiler..

  67. more to 64-bit than that by Chirs · · Score: 3, Interesting

    Moving to 64-bit may be a recompile away *for perfectly written code*. In the real world, a lot of 32-bit code assumes you can store pointers in ints, assumes that alignment and packing rules of pointers and ints are the same, prints out pointers using int formatting, uses algorithms that don't scale beyond ~16GB of memory, etc.

  68. Re:Buffer overflow by Creepy · · Score: 3, Interesting

    Wow... I haven't touched assembly since about 15 years ago. Trying to program your assembly to outperform a compiler with out-of-order instruction execution on the CPU takes a mad genius. You probably would get about 10x the speed boost by rewriting code to use GP-GPU instead.

    In defense of the grandparent, I'm fluent in C++, program it every day, and find it a mindbogglingly complex set of bolted on features that keep expanding and some that overlap each other. From a design perspective, elegant would be the last word I'd use for it, and it really was never a well designed extension on top of C IMO. Objective-C is a MUCH cleaner object extension to C, but it ties you to Apple (yeah, I know about GNUStep, but Apple drives the development of the language). In addition, many C++ features were so poorly implemented that they are rarely used, like try-throw-catch (I have yet to see professional code that uses them - hell, I've seen more code that uses the taboo GOTO for error handling than try-throw-catch). Templates are extremely powerful in C++, but often lead to ugly, obfuscated code. Multiple inheritance has also caused me many headaches compared to interfaces (like Java and Objective-C). C++11 only adds to the feature bloat, but some of the features are more "finally" for me like lambda functions and native multithreading. I've wanted native multithreading since I first started thread programming back in 1991, having to use 4 different thread libraries for 4 platforms (I believe pthreads, Windows threads, MacOS9 threads, and BeOS threads at that time - this was all student programming and I was still learning C++ and very self-motivated). D seems to have cleaned up a lot of the issues I have with C++, but wasn't ready for prime time when I tried it last (several years ago).

    I have a love hate relationship with perl, too (another language I use practically every day). It gets the job done, but really, I never needed objects in perl, and haven't used any new features since about perl 3. That said, it is the best cross platform shell language that I've found, and I can write and run quick powerful cross platform scripts.

  69. Please don't start new projects in C/C++ by roguegramma · · Score: 1

    There are many applications and games written in C/C++ that I love.

    I also occasionally code in C - sometimes it is fun to use pointers and read/write files without chaining two or three objects.

    There are however huge drawbacks to using C/C++.
    There is surely a full list somewhere, but for me currently the not-buying-point is the preprocessor.

    The preprocessor allows conditional compilation of any file. Sometimes the file might do that, sometimes something different.

    This means that it isn't practical to have pre-compiled modules (although I guess you could go the route of splitting your project into dozens of libraries).
    Thus, a very small file can require Gigabytes of memory to compile, because all the dependencies have to be pulled in, and represented in memory.

    C is cool for learning how things work, but not good for making things work.

    --
    Hey don't blame me, IANAB
    1. Re:Please don't start new projects in C/C++ by Anonymous Coward · · Score: 0

      So whats the best language for programming microcontrollers?

  70. C++ is not holding its position. by Anonymous Coward · · Score: 1

    It is steadily going down in last 10 years. And I do not think these 0x and 11 ting will bring any good news to it.
    C is very very stable...And do not mix C with C++. It DOES not make any sense.

  71. Ah, TIOBE again. by Millennium · · Score: 3, Insightful

    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?

  72. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  73. Aburd nonsense. by warrax_666 · · Score: 2

    Make the insecure code hard to write and make the secure code easy to write. Problem 99% solved.

    --
    HAND.
    1. Re:Aburd nonsense. by Joce640k · · Score: 1

      The only way to make that happen is to make the language so restricted it becomes useless.

      Strongly typed languages like C++ could make the SQL injection problem go away by using SQL libraries that only accept strings of type "safe_string" (or whatever). The compiler will enforce the rest. Unfortunately C++ isn't cool or hip enough for most programmers.

      (OTOH it'll probably outlive all the other languages on that list because real programmers will always appreciate it).

      --
      No sig today...
    2. Re:Aburd nonsense. by hackula · · Score: 1

      The only way to make that happen is to make the language so restricted it becomes useless.

      Using convention over configuration can make this problem disappear. You allow stupid, insecure stuff (you still have the goto keyword in languages like C#), but you do not make it the default option. In ASP.Net by default for example, all textboxes will throw an exception if they detect any html tags on postback. If you really need to get tags through the input (an html editor in a forum, for example) you can make a 1 line change to the web.config file to allow this. It basically says to you "We reallllly think you should do X in Y fashion, but if you insist, then knock yourself out!"

    3. Re:Aburd nonsense. by dkf · · Score: 1

      Strongly typed languages like C++ could make the SQL injection problem go away by using SQL libraries that only accept strings of type "safe_string" (or whatever). The compiler will enforce the rest.

      That'll only cover 99% of the cases. (Hey, it's a very useful subset!) The rest require evil string building because the SQL language itself doesn't allow for anything better; the awkward cases are where you want to substitute something other than a simple value, such as a whole WHERE clause (you could pass in a string to a stored procedure which reinterprets that as SQL, but that's hardly going to help with injection problems).

      Unfortunately, there's no substitute for taking care and having someone else (preferably someone very suspicious and knowledgeable) review the code and the deployment configuration too.

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
  74. Re:Buffer overflow by Joce640k · · Score: 1

    Can we please adopt languages that are not susceptible to buffer overflow/underrun errors? It's really pathetic that after all these years that's still a huge cause of security issues.

    That's down to programmers, not languages.

    eg. C++ done properly is as safe as Java. Modern C++ compilers have bounds checking enabled by default for all STL containers (on "operator[]", not just "at()"). If you're seeing overflows it's because of uneducated C programmers who think they're too cool to use them (eg. Linus Torvalds).

    SQL injection attacks are similar. Everybody knows about them, everybody knows how to avoid them, but people are still coding them.

    --
    No sig today...
  75. Re:Buffer overflow by Joce640k · · Score: 1

    A pocket knife doesn't implicitly create objects or fail to cleanup if you forget to make your destructor virtual.

    What compiler are you using? Mine gives me a warning if I forget that (and has done for at least the last eight years or so).

    --
    No sig today...
  76. Re:Buffer overflow by Joce640k · · Score: 1

    Since about 2010 you'll have to try pretty hard to find a platform that doesn't have a C++ compiler with move semantics.

    Even before that STL containers had a "swap()" function that worked pretty well for moving data.

    --
    No sig today...
  77. Re:Buffer overflow by dremon · · Score: 1

    My point is not that strings are objects but that it's easy to make a mistake by coding == instead of .equals (especially when coming from other languages where no such issue exists, C++ or Python). How's that different from forgetting virtual destructors? Another annoying issue is absolute incosistence in the method name (or property name) that returns the size of the collection.

  78. Re:Buffer overflow by s73v3r · · Score: 1

    While it would be nice for developers to "get their heads out of their butts," that's not a real solution and you know it. Developing some kind of extension to C, or some other systems programming language which has protection against buffer problems is.

  79. Re:Buffer overflow by Anonymous Coward · · Score: 0

    Problems you can fix vs. problems you can't. There are bad programmers. Some people are bad programmers all the time, all of us are bad programmers some of the time. That's just life. So what are you going to do about it? In my experience I'd MUCH rather debug some bad code written in Java/Python/Ruby than bad code written in C/C++. All other things being equal if you don't *need* C/C++ for some specific reason based on the type of work you're doing (speed/very careful memory management/etc.) you'll *probably* get a better result writing your code in one of the higher level languages.

  80. Re:Buffer overflow by Anonymous Coward · · Score: 0

    Tell me, did that language rant make you finally feel like a big man, with a big ePenis?

  81. Headline is misleading by Bill_the_Engineer · · Score: 2

    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.

    --
    These comments are my own and do not necessarily reflect the views or opinions of my employer or colleagues...
  82. Re:Buffer overflow by s73v3r · · Score: 2

    C++11 only adds to the feature bloat

    What feature bloat? If you don't use the new features, you don't incur any cost. No bloat.

    And many of the new features that you really should be using (smart pointers) have very little, if any overhead.

  83. Re:Buffer overflow by s73v3r · · Score: 1

    There is nothing I'd love more. But at work, we're still stuck on VS2003.

  84. FoxPro/xBase by Tablizer · · Score: 1

    Man, the good ol' days. I was able to crank out custom small-to-medium apps in FoxPro/xBase like nobody's mother. There was something magical about xBase that's hard to explain.

    Part of it was the tight and seamless integration between the database language and the imperative language. One could do a lot in so few lines and commands. The API's between the database and app code used now are so damned bloated and verbose in comparison. The granularity of the query language was also better than SQL. It's difficult to break SQL into multiple smaller queries in most RDBMS.

    Microsoft Access just doesn't quite cut it as a replacement. Apart from the fact MS keeps changing MS-Access, there is a disconnect between "mouse-based" design and the language (VBA). It's not very seamless to switch between them, and it takes almost 3 times as much VBA to code the same thing as xBase (at least non-GUI processing. xBase never quite got it's GUI act together, which is part of the reason for its shrinkage).

    I realize that much of the xBase code in practice ended up being a maintenance headache, but that's only if you didn't follow certain "safety" conventions. The slop-heads gave it a bad rap.

    People used to do things like put code expressions into tables, making it almost like a domain-specific spreadsheet or an instant Expert System. That's where my handle comes from.

    I hope something like it is reborn with some modernizations and better "safety". I really miss it for quick-and-dirty apps especially.

    Good Bye, my ol' friend.

    1. Re:FoxPro/xBase by shutdown+-p+now · · Score: 1

      FoxBase/FoxPro was indeed a lovely thing, and by far the best in xBase family. That said, from today's perspective, it would make some sense to do things a bit differently. One big attraction of xBase was that queries were fully integrated into the language - today, I'd rather take a general-purpose scripting language with solid metaprogramming capabilities, and use them extend it to the same effect, rather than hardcoding the queries into the language itself. That way you also get eval (&) for free.

      Also, the whole business with SCAN .. END SCAN is not really necessary - so long as you have generalized sequences and iteration over them as first class in the language (i.e. "foreach" / iterators), tables can then be represented as just such sequences, same as any other collection. While we're at it, unify queries over collections and tables in general, and make them be more declarative - i.e. make the syntax such that it's easier to use WHERE over IF, and joins over nested loops.

      SCATTER/GATHER was largely a hack due to the lack of full-featured UTDs. In a language with them, instead of mapping to variables, just expose records as objects, and provide an easy way to create a temp duplicate with the ability to commit or discard any in-memory changes with a single method call.

      Oh, and dear god, please no dynamic scoping for variables!

    2. Re:FoxPro/xBase by Tablizer · · Score: 1

      I've kicked around similar ideas, but don't see it pulling it off yet.

      A better scripting language still won't provide the integration between query and imperative processing needed. With client/server approaches, you can't "half" process stuff in queries and half in app code the same way you could in xBase. It forces the query-side and the imperative side apart.

      There may be an almost-as-good compromise, but I haven't seen it described yet.

      And look how easy it was to turn schemas into tables and tables into schemas in xBase. SQL doesn't provide that kind of schema meta-ability without a lot of nitty-gritty programming.

      Hopefully the pendulum will swing back and data-centric languages/tools will make a comeback. Attention to OOP kind of took focus away.

      Take Care

    3. Re:FoxPro/xBase by shutdown+-p+now · · Score: 1

      A better scripting language still won't provide the integration between query and imperative processing needed. With client/server approaches, you can't "half" process stuff in queries and half in app code the same way you could in xBase. It forces the query-side and the imperative side apart.

      I don't fully understand what you mean - can you give an xBase code example to illustrate? I suspect that it can still be done so long as language permits expressive DSLs - like, say, Tcl.

  85. Re:Buffer overflow by KGBear · · Score: 2

    Sorry, maybe I'm old, but I don't believe in systems designed to think for people.

  86. Re:Buffer overflow by s73v3r · · Score: 1

    Get businesses to pay for good programmers, and stop hiring the cheap, shitty ones.

    NOTE: This is not to insinuate that all expensive programmers are great, and all cheap programmers are crap.

  87. Re:Buffer overflow by luder · · Score: 1

    Funny, your comment reminds me of a teacher I had, he used to say the same thing with almost the same words. You're not from Portugal, are you?

  88. Re:Buffer overflow by Anonymous Coward · · Score: 0

    You are right about C++ of course. During the recent years I've been doing Java work. I really like the language and think it is optimal for many performance-critical, complex systems.

    However, in my experience Java, too, has its intricacies that baffle many experienced coders. For one, I don't see how you can code anything in Java without reading the chapter about the happens-before relation. Most Java programmers instead seem to have developed various degrees of superstitious taboos with regard to memory consistency.

    Another thing is the mindless reliance on the heap and threads. Java programmers have been encouraged since the nineties to pile objects on the heap and start hundreds of threads or more. With the abundance of RAM, GC problems are "solved" with memory upgrades, and network bottlenecks are "solved" with more threads. While its always good to have more RAM (eg, for automatic file system caching), you should not keep gigabytes' worth of tiny long-term objects on the heap because you are going to choke the GC. Instead, only keep a few hundred megabytes worth of temporary objects on the heap and store other objects in a file or -- equivalently -- serialize them in RAM.

  89. Re:Buffer overflow by hackula · · Score: 1

    Mono implements the majority of .Net these days. It also runs great on Linux and OSX.

  90. Re:Buffer overflow by ardor · · Score: 1

    Modern C++ makes it very difficult to produce buffer overflows. I wish people would stop criticizing C++ with age-old arguments that have been rendered obsolete long ago.

    --
    This sig does not contain any SCO code.
  91. I'm seeing more java on freshmeat.net by Anonymous Coward · · Score: 0

    err. freecode, lately, at least that's how it seems to me.
    The oracle buyout is bad for java, but android is good for java.

  92. Do pre-compilers still turn C++ into C? by xanthos · · Score: 1

    Don't use either anymore except for the occasional hack of existing C code, but in the olden days (Borland) when you compiled a C++ program you actually were running a pre-compiler to turn the C++ into C and then that went through the C compiler. Is that two pass methodology still used today or are there C++ specific compilers now?

    --
    Average Intelligence is a Scary Thing
    1. Re:Do pre-compilers still turn C++ into C? by cyberhooligan77 · · Score: 1

      Yes, there are some precompilers that still turn C++ into C. Sometimes, I work in a hobbyst related precompiler ("pet" project). I read in some places in the internet, specially game companies, that some companies use a precompiler, to turn c++ code, in a given platform, and later, the generated standard "plain C" to several architectures or computer platforms. I know, its better to have an optimized bug-free compiler, but, sometimes, a "precompiler" or "transcompiler" may be useful for some features.

    2. Re:Do pre-compilers still turn C++ into C? by hazah · · Score: 1

      Specific compilers existed since the 80s

  93. Re:Buffer overflow by icebraining · · Score: 1

    Oh, come on, everyone makes those mistakes, even respected maintainers of important libraries. And hell, even the damn cstdlib has functions like gets(), practically inviting programmers to introduce buffer overflows in their code.

    It's just irresponsible to rely on not ever making a mistake to secure your code.

  94. Re:Buffer overflow by Imagix · · Score: 1

    Huh.. I thought we were bad with VS2k5 ....

  95. No Groovy? by sapgau · · Score: 2

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

  96. Re:Buffer overflow by Dishevel · · Score: 1

    Its all the same.
    I was making the point that depending on your point of view there are the "Good Tools" and the "Shit Tools".
    But when you look into it they are all being used and they are all being used at different times and by different people both badly and well.
    Tools are tools. Craftsman are the makers.

    --
    Why is it so hard to only have politicians for a few years, then have them go away?
  97. RosettaCode shows solutions in diff languages by Anonymous Coward · · Score: 1

    RosettaCode.com shows solutions for common programming task written by experts in each of the different languages http://rosettacode.org/wiki/Main_Page

    I think over 400 languages are shown for hundreds of common problems.

  98. Re:Buffer overflow by Dishevel · · Score: 1

    I do not think I stated that I was good or bad at it.
    In fact I am sure I did not.
    I am pointing out that bad fucking programmers are bad fucking programmers.
    Holding their hand with slow, hand holding languages is not a good solution.
    Teaching good coding is.

    --
    Why is it so hard to only have politicians for a few years, then have them go away?
  99. Re:Buffer overflow by Darinbob · · Score: 3, Insightful

    Because too many of these programmers don't program anymore. They just tie together modules and libraries with function calls and templates.

    The reason C is still big is because there's just so much stuff out that that is not a PC. On a PC you can get away with being unskilled and sloppy, because memory is getting cheaper, CPUs are getting faster, and users are becoming less discerning. Most computers in the world though are not PCs, they're small things hidden inside of devices and they don't run Windows. Some may be slow, some may be fast, but most have resource constraints of some form. Quite a lot of them come with no third party OS or run time library either. And someone has to write all that stuff in something that's reasonably efficient and portable and C and C++ are pretty much the common choices.

  100. Re:Buffer overflow by gangien · · Score: 1

    lol.

    You know why computers are useful? cus they do shit for us.

    how about developers get their heads out of their butts and learn how to be programmers, instead of whining that real languages don't do everything for them?

    Is such a stupid statement. To err is human. You give people the opportunity to make mistakes and they will. Doesn't matter how 'good' they are.

  101. Comment removed by account_deleted · · Score: 4, Informative

    Comment removed based on user account deletion

  102. Re:Buffer overflow by Darinbob · · Score: 3, Insightful

    For a lot of functions it is not difficult to write if more efficiently than some good compilers. It's a trick to optimize it the way you need to for certain resource constraints. You wouldn't want to do that for everything, it would take too long. But it's doable for key functions in run time libraries (ie, writing a memcpy that knows how to use your cache instructions).

    The "average case" is fine most of the time but quite often there are exceptions. I've seen people who rely on this stuff too much, who argue until they're blue in the face that STL maps are "proven optimal by people smarter than you".

  103. Re:Buffer overflow by JAlexoi · · Score: 1

    My point is not that strings are objects but that it's easy to make a mistake by coding == instead of .equals (especially when coming from other languages where no such issue exists, C++ or Python). How's that different from forgetting virtual destructors?

    A) No idea what a virtual destructor is.
    B) It's not easy to make that mistake even after a few days, because in Java you mostly compare everything using .equals(). Comparing something using == is not that widespread in day-to-day coding, even in a short program. Most books and tutorials will point that out early.
    C) If you're using something like PMD or FindBugs (Eclipse even has plugins for that), you will get errors with explanations.
    D) There are some very clear and straightforward tenants of Java language. If you're coming from other languages and not familiarizing yourself with them, it's really not an issue of the language. Complaining about Java without familiarizing yourself with essential principles, is like complaining that C/C++ has manual memory management and pointers. I came to Java a mere 12 years ago from C, ASM, Pascal, Perl and PHP. Picking up .equals() was never, ever, a problem for me nor anyone I know.

  104. Re:Buffer overflow by Darinbob · · Score: 1

    I see too many people who assume that "don't optimize prematurely" means that they should never optimize. These sorts of people I think learn some catch phrases in school but never actually think them out and treat them as sacred rules. Similar to the people who think "goto" must never be used.

  105. Automatic cleanup by Dcnjoe60 · · Score: 2

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

  106. Re:Buffer overflow by gangien · · Score: 1

    while java is far from issue free, you picked a pretty poor point. In fact, your point is one of the good things about java. that is, when you use an operator you know exactly what it's doing. It's not ambiguous.

  107. It's not even that by edxwelch · · Score: 1

    Acording to their own documentation (http://www.tiobe.com/index.php/content/paperinfo/tpci/tpci_definition.htm) Tiobe index calculated by how many times the langauge is mentioned on top websites. Really, that has nothing to do with the number of lines of code written.

  108. WHERE'S FORTRAN?? by Anonymous Coward · · Score: 1

    Fortran2000 is so cutting edge.

  109. Re:Buffer overflow by tibman · · Score: 1

    We agree! Joyous occasion on the internet :)

    --
    http://soylentnews.org/~tibman
  110. Re:Buffer overflow by del_diablo · · Score: 1

    As far as I know, ZSNES is still the fastest emulator on Windows. What is it written in? x86 assembly.

  111. Re:Buffer overflow by Anonymous Coward · · Score: 0

    rarely used, like try-throw-catch

    We obviously work in very different places. They are fairly common, and quite useful, in C++ code that I've worked on for professional products. YMMV

  112. VB.NET? by PlastikMissle · · Score: 1

    Am I the only one surprised at the sudden spike in VB.NET's standings? http://www.tiobe.com/index.php/paperinfo/tpci/Visual_Basic__NET.html Don't get me wrong, I love VB.NET and would probably be working on it today if my employer didn't prefer C#, but that spike baffles me,

    1. Re:VB.NET? by Anonymous Coward · · Score: 1

      Really? You love having a separate operator for integer division, and having to add "Else" to your boolean comparisons if you want them to short-circuit? Damn, I'm glad I'm not your employer.

  113. Re:Buffer overflow by snemarch · · Score: 1

    ...and at the same time does away with all resource leaks, not just memory leaks? Your pretty little garbage-collected languages take so much more effort to handle properly than C++'s RAII approach.

    (I do Java for my day job, and I kinda think I'd rather do C++ if the jobs were around).

    --
    Coffee-driven development.
  114. Re:Buffer overflow by Wootery · · Score: 1

    You write the C# -> native compiler first ;)

    And how do you think C# code is executed?

    The "Native Image Generator" is

    the Ahead-of-time compilation service of the .NET Framework. It allows a .NET assembly to be pre-compiled instead of letting the Common Language Runtime do a Just-in-time compilation at runtime

    Not an ordinary .exe, granted, but the native code is there even in normal C# use. Ordinary native binaries can be generated from C# if necessary though - this is how Mono targets platforms like the Wii. The reason you can't write (normal) Windows drivers in C# is because Windows isn't written in C#.

    That said, bindings exist for libusb, so that's a start.

    (There seem to be a number of similar bindings for Java, and a standard API spec that no-one's implemented.)

    Google tells me two operating systems have been written in C#: Cosmos and Singularity.

    This isn't to say C# is more suited than C to OS/driver work, but it can be done.

  115. Re:Buffer overflow by snemarch · · Score: 1

    Premature optimization is bad. Premature pessimization is worse :)

    --
    Coffee-driven development.
  116. Re:Buffer overflow by Wootery · · Score: 1

    I don't think Creepy's use of "feature bloat" was referring to run-time performance - having too many features in a language is itself a Bad Thing.

    It's harder to write a complete and conformant compiler, for one, so it hurts portability - advanced C++ template code is plagued by this already. It also hurts readability: if I code using a certain subset of C++ (because it's too vast a language for me to keep all of it in my head at once), and you're used to another subset, you'll have trouble reading my code.

  117. Re:Buffer overflow by RaceProUK · · Score: 1

    Compiled C# assemblies are normally run through the JIT - the Native Image Generator is an option.

    But you're right in saying it's all down to the bindings.

    --
    No colour or religion ever stopped the bullet from a gun
  118. Re:Buffer overflow by Anonymous Coward · · Score: 1

    'Optimizing' every piece of code you write, without thought for readability, maintenance, or whether or not the code even needs to be 'fast', is a sure sign that you're doing it wrong.

  119. Re:Buffer overflow by luis_a_espinal · · Score: 1

    Java is not exactly issue-free as well. For example lack of comparison operator for strings forces a programmer to abandon an intiutive ways of doying things and to always remember to follow the language obscure rules.

    Unfortunately for your argument, those issues you discuss have already been handled so thoroughly, and documented so pervasively in the APIs and JLS that they are no longer the subject of questions for a long, long, long time. Whereas, when you work in C++, you better have Scott Meyer's and the C++ spec next to you at all times. As a programmer that has done Java and C++ for a living, I can tell you that the amount of syntactic/semantic minutia you have to track in Java (or plain old C) pales in comparison with C++.

    Your example of comparison of Strings is not an accurate description of how Java is to be used. It is very specific in the JSL what "=" is for - to compare primitives, primitives being char, bytes, ints, longs (the typical scalar stuff) and object references. For anything else, you need a comparator function that, as specified in the language specs, imposses a total ordering. The function is specific to the context of usage - it will be an override of Object.equals, or an implementation of Comparable.compareTo, or, if you need pluggable total order functions, one or more implementations of java.util.Comparator.compare. After 17 years of Java being in the while, this has already been settled.

    That pales in comparison with C++ rules for ctors, dtors, operator overloading, constness, the accidental passing of non-pods into vararg methods.

    Same for unsigned bytes

    There is no such thing in Java as an unsigned byte. A Java byte is just a bunch of raw bytes of an opaque nature (much like a CORBA::octet).

    and integers.

    I don't follow this. What exactly are you referring to when comparing integers?

    Same for resource leaks

    Give me a Java resource leak over a C++ one. I can instrument bytecode so that I can record a stack trace on an object creation, which would get printed when its finalizer gets invoked, or with JMX or some type of admin console, with little to no change on an application source code. You could so sorta the same in C or C++ with Valgrind, but there is a lot more elbow grease involved when hunting these kind of things on a C/C++ application. Sorry, when it comes to resource management and resource leak tracking, this is one are where managed code beats unmanaged code, bars none.

    and forgotten "finally" blocks.

    Which are less demonic than C++ catch(...). At least we get the option of having a finally block when programming in Java. In C++ we do not have that at all. Oh my God, that is one of the things I miss the most when working in C++. That, and structured exceptions as first-class types. THAT is the greatest flaw in C++ exception paradigm. I can understand why that was not included, but I honestly believe it has ultimately proved to be a flaw in the language (all languages have flaws, so it is not that I'm picking on C++ just because I'm jerking my programming language fanboi proclivities.)

    I trully and honestly I not using exceptions at all in C++. Hell, I prefer working with plain C or simply use C++ a-la C-with-classes.

    The old, sparkling shine I used to see in C++ has become a lackluster dim. I've come to the conclusion that C++ is/was the victim of the state of the art compiler and language design of its time. Too much cobbled together using technology and concepts of the day, coupled with a need to remain compatible/easily integratable (sp?) with C code.

    I'd rather work with C, or with a managed, modern (or relatively modern) language. That's just me. Obviously YMMV. So in the end is not whether X or Y language is issue free (none is). The question is what exactly you get in return when dealing the total complexity of a language, and what effort does a person has to take to either a) select a subset of that complexity to complete a task or b) comprehend a large chunk of said complexity.

  120. Re:Buffer overflow by dkf · · Score: 1

    Although I will agree that language choice *usually* matters far less than algorithmic choices and occasionally people jump to a language change in a project to alleviate slowness only to end up not significantly better than they started because of glaring design problems that dwarf the language performance concerns.

    Language choice can make a difference, but that's usually because higher level programming languages tend to have very well written string and buffer management libraries that avoid most of the problems that bedevil a lot of code in C and C++ (and Java too). It's not that the lower level languages can't be used efficiently, but rather that a substantial fraction of their practitioners simply don't use their tools well. The higher level languages, because they conceal more, can hide enough gory details that they can actually keep enough useful metadata around to be able to optimize algorithmically. Well, some of the time.

    The next time I see someone using strcat() in an inner loop (or += over Strings in Java) I think I'll scream.

    --
    "Little does he know, but there is no 'I' in 'Idiot'!"
  121. Re:Buffer overflow by dremon · · Score: 1

    My reply was mainly to original parent: http://developers.slashdot.org/comments.pl?sid=2807769&cid=39781843. I never had the described issues with C++ (virtual destructors, forgotten cleanups, etc). The "ugliness" and complexity of the code is solely a programmer's fault, not the language. I just tried to show that similar issues exist in Java, including resource leaks, forgotten cleanups, "finally" statements, incorrect object comparison, etc.

  122. established best practice... by mevets · · Score: 1

    It was a best practice before C++ went bonkers... Maybe up to version 2; after that, why bother? The C++ code will eventually be thrown out, or if it is worth keeping, re-implemented in C anyways.

  123. Re:Buffer overflow by Wootery · · Score: 1

    Got me - I'm more into the Java side of things really.

    Apparently Paint.NET (the first C# desktop app that sprang to mind) uses it.

    Do you know if an ordinary DLL can be generated, say, by Mono? If I recall correctly, it's somewhat complicated in D, because of garbage-collection; I imagine it would be similar with C#.

  124. Re:Buffer overflow by CSMoran · · Score: 1

    Wow... I haven't touched assembly since about 15 years ago. Trying to program your assembly to outperform a compiler with out-of-order instruction execution on the CPU takes a mad genius.

    In defense of the post you're replying to -- they said "you will see assembly", not "you will write assembly", I take it they meant hand-optimized assembly code delivered by the vendor that makes the lowest level bottlenecks like matrix-vector multiplications or FFTs blazingly fast. The kind of code that takes different paths depending on the CPU model to carefully pipeline instructions, use extensions and to use the cache efficiently.

    --
    Every end has half a stick.
  125. Re:Buffer overflow by CSMoran · · Score: 1

    Get reasonably recent compilers. GCC 4.3 already had some of the C++11 stuff implemented, as did Visual Studio 2010. Move up to GCC 4.7 and Visual Studio 11, and you get more complete C++11 implementations (as well as Clang).

    That's a great idea, but it only works when you deliver executables. If you distribute sources and a configure script you can't reasonably expect all your targets to run gcc 4.7 today.

    --
    Every end has half a stick.
  126. Re:Buffer overflow by RaceProUK · · Score: 1

    Just had a look into NGEN - it still runs on top of the CLR, so still runs within the .NET VM. So I think we're back to my original challenge to write a full C#->native compiler :)

    --
    No colour or religion ever stopped the bullet from a gun
  127. Yet another NOOB post by Anonymous Coward · · Score: 0

    Poor up-mod by those that don't understand there are varied means of increasing of code performance. Also poor form to assume the parent post knows nothing of Big O. Also shows a lack of understanding real-time systems, embedded code, FPGA, DSP chips, etc, etc.

    Abstractions carry a cost, it's as simple as that.

  128. Re:Buffer overflow by loufoque · · Score: 1

    There is no way to prevent buffer overflows without checking at runtime whether the index is within the buffer, whatever the language. Static analysis can be used to remove that check in certain cases, but it only works in relatively simplistic scenarios.

    Usage in C is to not perform this check because buffers are ubiquitous, and given that it is normally relatively easy to prevent the buffer overflow by sane coding practices, it is judged the performance overhead is not worth it.

  129. Re:Buffer overflow by loufoque · · Score: 1

    In addition, many C++ features were so poorly implemented that they are rarely used, like try-throw-catch (I have yet to see professional code that uses them - hell, I've seen more code that uses the taboo GOTO for error handling than try-throw-catch).

    How are exceptions poorly implemented? They incur no runtime overhead (unlike branches) unless an error occurs. They do, however, make code size a little bit larger, which is why it is often avoided in embedded systems (even if most of them could support them just fine).

    I've seen them used in many professional settings, but they tend to be discarded for most high-performance code.

  130. Re:Buffer overflow by Dishevel · · Score: 1

    I have to disagree on your badly thought out and trollish position stating that we do in fact agree.
    (Internet all back to normal now) :)

    --
    Why is it so hard to only have politicians for a few years, then have them go away?
  131. Re:Buffer overflow by Wootery · · Score: 1

    Mono can generate a normal, runs-without-Mono, Windows .exe executable from your C#, but I get the impression that generation of a (native) .dll can't be done, even with Mono.

  132. http://capecoder.wordpress.com/2012/04/09/language by Anonymous Coward · · Score: 0

    http://capecoder.wordpress.com/2012/04/09/language-popularity-its-not-about-search-engine-result-counts/

  133. How accurate could this be? by walterbyrd · · Score: 1

    I don't really care. But it seems to me there would be not accurate way to measure this sort of thing.

  134. Re:Buffer overflow by KGBear · · Score: 1

    No. What is irresponsible is not testing the heck out of your code before shipping it. You should be doing that anyway, why not code according to safe procedures and doing some real QA while you're at it? It is also irresponsible to create a whole generation of developers with no concept of security and efficiency, because modern languages are supposed to do that for them, at great expense of everybody else.

  135. Re:Buffer overflow by KGBear · · Score: 1

    Thank you.

  136. Moronic list... by segfault_0 · · Score: 1

    I can't believe these people get press for doing web searches with the names of programming languages and counting hits. We all just lost the game for even wasting our time considering it.

    --

    I was crazy back when being crazy really meant something. (Charles Manson)
  137. No, it's one that's being replaced by better PLs.. by Qbertino · · Score: 1

    ... such as the newer Java, which combines the clean, easy and manageable syntax of C with the blazing speed of Smalltalk.

    *Tadum* *Crash* *Thud*

    Thank you, thank you, I'm here all week. Try the fish and tip your waitor.

    --
    We suffer more in our imagination than in reality. - Seneca
  138. Re:Buffer overflow by Kjella · · Score: 1

    What feature bloat? If you don't use the new features, you don't incur any cost. No bloat.

    I'm fairly fluent in three languages, but if I switched between them at random during a conversation depending on which one lets me express myself better I would just have created an insanely complex language with enormous redundancy and extremely inconsistent pronunciation and grammar that would be massive pain for anyone else to learn. You can't simply say "well now you can express everything you could in one language and much, much more" and pretend that's an advantage with no drawbacks. Or even if it's the same language and you're writing a book with each author contributing a page each you wouldn't want the style to change radically from page to page, particularly when editors constantly go in and redo a page here and paragraph there.

    I don't think it's possible to completely avoid code style wars, but if there's one generally accepted "best practice" way of doing things - and I don't necessarily mean in your team or in your company but in the language ecosystem and all your new hires too - then everyone can understand a code base much faster and is more productive. Consistency is huge, you want everything to behave in predictable ways. Not to mention basic training time, how long until you know the language features? The more you add to it, the worse it gets because unlike human languages working code doesn't get replaced no matter how archaic the language. Of course there's such a thing as too sparse a language too, but for the most part I'd say less is more even if it doesn't solve everything optimally.

    --
    Live today, because you never know what tomorrow brings
  139. Really? Make a decision based on that chart? by ArcadeNut · · Score: 1

    The index can be used to check whether your programming skills are still up to date or to make a strategic decision about what programming language should be adopted when starting to build a new software system. The definition of the TIOBE index can be found here.

    The chart would seem to indicate that because it's ranked higher those are the skills you should be concentrating on? I don't think so.

    T-SQL is near the bottom, yet if you do any MS SQL development, it's just as important as any other language on that list. JavaScript? If you're doing web development, it's just as important to know as T-SQL or C# or what ever your language of choice is.

    The statistics are meaningless for making any real decisions about what you should learn or be proficient at.

    --
    Visit the Arcade Restoration Workshop @ http://www.arcaderestoration.com
  140. GETTING BACK INTO c / c++ by Anonymous Coward · · Score: 0

    A long time ago I owned Borland C++ ( also the Lisp and Pascal compilers) but thats long gone and never really warmed to Java

          I would like to get back into playing with C / C++ at home and Im happy to pay a reasonable amount for a home IDE to brush up and write stuff and play.... but not 000s

    OH I run Linux Mint - on my main PC (although I have a Win XP VM)

      What do people use to code in C / C++ - what are your recommendations these days ???

  141. Re:Buffer overflow by Anonymous Coward · · Score: 0

    Fool. Have you never worked with other people??

    They use features you don't like and bang! you have feature bloat. Of course it's in the mind of the dev, but then that's where it always was...

  142. Then why... by Jiro · · Score: 1

    Why is it that when I search for jobs, I find a lot more C++ than C jobs, and when I do find a C job,
    1) either the job is actually "C/C++", or
    2) depending on the site or employer, some job postings mung punctuation, thus causing C# or C++ jobs to show up as C.

  143. Re:Buffer overflow by stewartjm · · Score: 1

    Actually, things are advanced to the point where with very rare exception a human writing assembly is almost certainly not going to produce the optimal approach anymore.

    Compilers are in general horrible at getting anywhere near full throughput out of the SIMD instructions on modern CPUs. At least partially because the languages don't provide data types and operators that map well to how the SIMD instructions work. For most tight number crunching loops, you'll be lucky if straight forward, compiled code is achieving even 25% of the throughput that the CPU is capable of. To achieve full throughput, you'll need to understand the SIMD architecture, and hand roll some assembly language or C/C++ code using SIMD intrinsics.

    However, for most programs, it's usually not worth the time, effort, and "brittleness" of the resulting code.

  144. 64-bit x86 doubles number of GP registers by perpenso · · Score: 1

    In x86 land the code/data bloat is somewhat offset by the doubling of the number of general purpose registers and other architectural improvements of 64-bit mode. 64-bit mode is not strictly a wider incarnation of 32-bit mode.

    That said your point is very valid. Write portable code, build for both modes and measure is the way to go IMHO.

    Now I have to go, depressed and sad ... your post reminded me of the Alpha we spent so much time studying in grad school in that mid 90s time frame. :-)

  145. VB's H/W Req's a "5400 RPM Hard Drive" :MS by ivi · · Score: 1

    When did Micrsoft begin to specify - as a System Requirement for its software - the rotational speed of one's hard drive(s), ie, as it does - quite explicitly - here:

    + http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-basic-express/system-requirements

    ?

    If it's spinning a bit more slowly, the user waits a bit longer... Right?

  146. Re:Buffer overflow by kungfuj35u5 · · Score: 1

    Premature optimization does not refer to hacked sloppy solutions as much as it does illegible and neglible counter intuitive code practices that account for little to no gain. You should only be trying to squeeze out fewer microseconds when the program calls for it. It is a widely known rule of thumb to first right things clearly and perhaps even naively, profile and then optimize when the performance is not within acceptable range.

  147. Re:Buffer overflow by kungfuj35u5 · · Score: 1

    Correction that should be write, not right.

  148. Re:Buffer overflow by Anonymous Coward · · Score: 0

    haven't used any new features since about perl 3

    Seriously? Just read the (free) Modern Perl book sometime. You're bound to pick up lots of useful ideas. The Perl community has moved on a great deal since the 90's, you know.

  149. Except for the minor point that I have used it by Viol8 · · Score: 1

    And I fscking hate it.

    Thanks for playing.

  150. I'm biased: Perl by concealment · · Score: 1

    Others may have more experience or more general experience, but mine has been that language trends come and go but there will always be some constants. To me it seems like Perl is one of them; if you're doing anything short of application development, it's probably the fastest way to get it to work. Anything else would do well in the C++ or Java realm. I have never seen a need to move to Python. It's a fine language but doesn't offer any tangible improvements over Perl.

  151. Re:Buffer overflow by Anonymous Coward · · Score: 0

    I'm not sure that's really true. Especially if you want to use bleeding edge instruction sets, you will probably be better at hand-optimizing it than the compiler will. There's also the fact that you can look at the compiler's output, so you should never do worse than the compiler.

    I think auto-vectorization has improved a lot recently, but not too long ago it really sucked. C++ is not a very good language for optimization since it has no guarantees about independence or immutability of data (e.g. const can be cast away, the compiler has no way of knowing library functions are pure, and there's the perennial problem of aliasing), and so there are optimizations that are very difficult for the compiler to make.

    One example I've run into recently would be the shuffle instruction from SSE. There's no way a compiler would be able to look at C++ code and figure out its purpose to to shuffle some bytes.

  152. Most used or most difficult? by Still+Having+Fun · · Score: 1

    The ranking was done simply by "counting hits of the most popular search engines" for each language. A large number of hits might just imply that a language is more difficult to use and requires more on-line assistance.

  153. What about the embedded world? by Romxero · · Score: 1

    C is very popular with embedded electronic devices, so it doesn't strike me odd that it is coming back.

  154. Re:Buffer overflow by Anonymous Coward · · Score: 0

    I think you would be surprised at how much we are wrong about what a compiler does for us. The fact is that compilers try and do there best, but at the end of the day they mostly just do what you tell them to do. I worked on a contest at my job a little while ago, and found that many of my long held assumptions about what a compiler optimizes for me were just plain wrong. Even though it is true that a compiler can inline functions, or make use or registers for function variables, or do memory and pointer optimizations, the reality was that it didn't do them unless I forced them to. I was able to go through 10 revisions on my entry each time increasing the performance by almost an order of magnitude, and each time it was because one of those optimizations that I thought was supposed to be automatic, was not really happening after all.

    Pretty much a smart person can make code faster, and faster almost in perpetuity. Code is never done. It just becomes good enough at some point.

    All of that being said... performance really doesn't matter most of the time. The hardware makes up for inadequate code most of the time and that's fine since that inadequate code is probably more readable and will require less maintenance.

    Just my humble opinion.

  155. Re:Buffer overflow by Anonymous Coward · · Score: 0

    Might as well start off writing it all in assembly, since compilers don't always produce the fastest possible code.

    Actually, things are advanced to the point where with very rare exception a human writing assembly is almost certainly not going to produce the optimal approach anymore.

    LOL I have been hearing that meme for at least 25 years. Anyone who says this has never worked in assembly language. Even an intermediate assembly language programmer will do much much better than a compiler. I rarely need to write in assembly anymore, but when I have had to, I usually can cut the running time in half or better - and I don't consider myself an expert assembly programmer.

    For 99% of programming the compilers are good enough - but we use them because it is easier to maintain and write in higher level languages. NOT because the compilers write better code than a person can.