Slashdot Mirror


Most Popular Programming Languages: C++ Knocks Python Out of Top Three in New Study (techrepublic.com)

C++ has knocked machine-learning favorite Python out of the top 3 in the TIOBE Index of popular programming languages. From a report: It marks a reversal of fortune for C++, which, after years of occupying third place in the index, was pushed down to fourth place by Python in September last year. First and second place in the list remain unchanged, with Java in pole position and C at number two. The TIOBE Index attempts to estimate the popularity of languages worldwide based on results from major search engines. The index is sometimes criticized for being a rather blunt measure, likely to be influenced by a range of factors beyond a language's popularity, but its rankings are broadly in line with others, with a similar mix of languages albeit arranged in a different order.

In an analysis alongside the latest figures, TIOBE attributes the comeback of C++ to a surge in its popularity, rather than a fall in the use of Python. "This is certainly not because Python is in decline: Python is scoring all time highs almost every month. It is just that C++ is also getting more and more popular," it writes. The report credits this growing interest in C++ to C++11, the version of the language released in 2011 that TIOBE said made C++ "much simpler, safer and more expressive."

28 of 161 comments (clear)

  1. Safer, simpler, more expressive by Latent+Heat · · Score: 3, Insightful

    Pick any two.

    1. Re:Safer, simpler, more expressive by DickBreath · · Score: 2

      I don't care how simpler C++ thinks it is.

      I can write a bigger, slower program in Java, in less time, any day of the week.

      --

      I'll see your senator, and I'll raise you two judges.
    2. Re:Safer, simpler, more expressive by ceoyoyo · · Score: 2

      In my experience, the expressiveness of C++ has always made it non-simple. So maybe pick one?

    3. Re:Safer, simpler, more expressive by Tough+Love · · Score: 2

      #4: slower. Python wins by a mile.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    4. Re:Safer, simpler, more expressive by jma05 · · Score: 3, Insightful

      You must not have used Java very much. Java IDEs mostly write all the tedious code for you, much more so than C++ IDEs can for C++ (Java is a much simpler language). No one writes casts, exception handlers etc by hand. Verbose, yes, but it is much easier to write Java than C++ for all but the simplest programs. That is one of its selling points.

      > Java constantly wants me to explicitly cast one data type to another, even if it's blatantly obvious what I intended.

      Give me an example.

      And if you think the compiler whining is a bad think, you will hate Rust, ML or Haskell, because Java is hardly the standard for a whiny compiler.
      Compiler warnings are a good thing. They save later debugging time, which is much more painful. Addressing the compiler while writing code for the first time is much simpler. It is just higher upfront cost, not higher total cost in programmer time.

  2. Make C++ simpler ?!? by dargaud · · Score: 5, Interesting
    You would have to remove things from it, not just keep adding every paradigm from every other language. That thing has everything and the kitchen thing: you can do pure C with it. Or (almost) pure Java. Or only macros and templates. Anyway one programmer's C++ program might as well be an alien language to another C++ programmer.

    Besides that, their whole methodology is crap, as has been noted many times over: if there are plenty of messages asking for help on stackoverflow, maybe it's because users are struggling with a language, not because it's 'popular'. A language that is very easy to learn on your own wouldn't have any messages now would it ?

    --
    Non-Linux Penguins ?
    1. Re:Make C++ simpler ?!? by Pseudonym · · Score: 2, Interesting

      You would have to remove things from it, not just keep adding every paradigm from every other language.

      Things are being removed from C++, but that's not the point here. You don't have to remove large slabs of the language, you just have to choose not to use them. The craziness that is C++ locales, for example, need not concern you because you won't use it.

      Modern C++ is mostly about not using implementation inheritance, which is the one thing that bitter experience has shown makes C++ software brittle. But you can't remove it from the language because all of that 1990s era hierarchical tarpit code wouldn't work then.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    2. Re:Make C++ simpler ?!? by ranton · · Score: 5, Insightful

      You don't have to remove large slabs of the language, you just have to choose not to use them. The craziness that is C++ locales, for example, need not concern you because you won't use it.

      This is only true if you are either working alone or have control over the development practices of your product team. And hopefully you never move companies or acquire a company that develops differently than you do.

      Otherwise every feature in your language of choice is something you may need to use if you are supporting work done by other developers who use that feature.

      --
      -- All that is necessary for the triumph of evil is that good men do nothing. -- Edmund Burke
    3. Re:Make C++ simpler ?!? by OzPeter · · Score: 4, Informative

      You would have to remove things from it, not just keep adding every paradigm from every other language. That thing has everything and the kitchen thing: you can do pure C with it. Or (almost) pure Java. Or only macros and templates. Anyway one programmer's C++ program might as well be an alien language to another C++ programmer.

      I can't remember who said it, but they said that C++ is actually 4 distinct languages under one banner (from memory): Procedural, OOP, C-style Macros, and Templates.

      Each of them have different attributes and gotcha's.

      I used to know C++ fairly well in the late 90's, but when I look at the current state of it I tend to shake any head in wonder as to what it has become. Not only have there been so many new additions to it, there have also been completely new paradigms in how to approach it.

      --
      I am Slashdot. Are you Slashdot as well?
    4. Re:Make C++ simpler ?!? by ceoyoyo · · Score: 4, Insightful

      It's also only true if you ever only look at your own code. One of the most irritating things about C++ is that in order to understand someone else's code you have to first essentially learn a new language by going through the project's style guide. If they have one. And it's any good.

      Hey, I found this great open source project, I just need to add/tweak this little feature... OMG, KILL IT WITH FIRE.

    5. Re:Make C++ simpler ?!? by TheRaven64 · · Score: 2

      The craziness that is C++ locales, for example, need not concern you because you won't use it.

      Are you sure? I have a version of libc++ that works in the FreeBSD kernel, but I needed to do some quite drastic surgery to remove all of the locale stuff (which I really don't want in the kernel - anything that needs localisation should be done in userspace). A lot of the standard library depends on it indirectly and so I needed a lot of stubs to even let the standard library build.

      The C++ standard library could really benefit from some better modularity and layering. The core ADTs, the threading library, simple string handling, localised Unicode string handling, and so on should all be separated out and the dependencies between them made explicit. Unfortunately, the C++ standards committee is philosophically opposed to subsetting, which means that instead of a handful of standard subsets we have hundreds of per-project subsets.

      --
      I am TheRaven on Soylent News
  3. Out of curiosity ... by fahrbot-bot · · Score: 2

    Anyone know what programming language (or other tool) is used to process the data and generate the TIOBE Index?

    --
    It must have been something you assimilated. . . .
    1. Re:Out of curiosity ... by Anonymous Coward · · Score: 2, Funny

      Most likely Node.js with 300 dependencies - one for each function call.

  4. Assembly by Ramley · · Score: 4, Interesting

    I was surprised to see Assembly in the top 10. Perhaps I shouldn't be, as I'm not in the world which uses Assembly, and I haven't even played with it since college back in the day.

    Forgive my ignorance here, but why the popularity of Assembly? It's impressive to say the least, but I'm unfamiliar with the world that lives in that language.

    Happy Monday!

    1. Re:Assembly by chester_br · · Score: 2

      Maybe it's a side effect on how TIOBE measures "popularity" by looking at frequency in search engines - surely, that correlates with popularity, but also (IMHO) with complexity, which may have brought our friendly neighbourhood (Assembly) into the spotlight :-D

    2. Re:Assembly by Heir+Of+The+Mess · · Score: 3, Informative

      I wouldn't put too much faith in the TIOBE index, for example it shows VB.NET at number 5, above C# at number 6 which can't be right.

      I think you'll find PYPL to be a better indicator of language popularity which has VBA and VB in its proper place at #13 and #17 respectively.

      --
      Australian running a company that does C# / C++ / Java / SQL / Python / Mathematica
  5. Use whitespace syntactically... by John+Guilt · · Score: 2, Informative

    ...and you oughtn't be anywhere near the top. Just my absolutely accurate and precise opinion.

    1. Re:Use whitespace syntactically... by hazem · · Score: 4, Insightful

      You're getting marked as flame-bait, but I agree. Try reading (and typing in) code from a book with C (or practically any other language), and you'll have no problems. Try the same with a book with Python code that spans a page-break, and you'll have to break out a ruler to figure out the correct number of syntactic spaces.

      It's a fine scripting language, but it's hard to take seriously with limitations like that.

  6. Namespaces in C by darthsilun · · Score: 4, Interesting

    Could we just have namespaces in C? Maybe reference types?
    Or pushing the envelope, how about a simple single-inheritance class model? It seems like every project I've ever worked on has jumped through hoops creating a simplistic "object" model.
    I've already been down this road once (or twice). We used C++ with no boost and limited to a very small set of features (well documented). But then along came someone who just wanted to use one little thing in boost. Or some other thing no on the list.
    And then the long slide down the slippery slope began.

    1. Re:Namespaces in C by goose-incarnated · · Score: 2
      I hear you!

      Or pushing the envelope, how about a simple single-inheritance class model?

      I have this. I wrote a parser that reads in class definitions and spits out structs. Fields that are inherited from parents and marked as public are placed into the struct directly, and getters/setters are generated automatically for each field.

      It turned out less useful than I thought - for a feature to be useful it has to be part of the standard, not an add-on, else other programmers won't want to use it.

      --
      I'm a minority race. Save your vitriol for white people.
  7. CLICKBAIT VIDEO SPAM by michaelcole · · Score: 3, Informative

    This article is a video rehash of a 6-month-old yearly survey.

    What you're looking for is here: https://www.tiobe.com/tiobe-in...

  8. VB.NET? by NerdENerd · · Score: 4, Informative

    As a 15 year .NET veteran I call bullshit on VB.NET being so popular. Nobody uses VB.NET and .NET developers laugh at you if you do.

  9. Most Puzzling Computer Languages by Tough+Love · · Score: 3, Insightful

    What TIOBE measures: how puzzling a language is to how many Stackoverflow members. So C++ can win, even if it used by fewer Stackoverflow members, because it is more puzzling.

    Of course, in order to have any users at all, a language must make itself useful, which C++ does by a variety of metrics, but most notably efficiency. If you care about getting the most bang for your buck out of your expensive, power hungry data center, then you hire more expensive developers and do the job in C++. If you care about lowest possible latency in a financial trading platform, again you do the job in C++. Go ahead, try it in Python. You can do it, it has been done, but you will get eaten alive in the trading jungle.

    --
    When all you have is a hammer, every problem starts to look like a thumb.
  10. Drivel of cute languages by Anonymous Coward · · Score: 3, Insightful

    Career advice: Ignore the drip drip of new rising star languages and the drivel of proponent's blog entries.

    There are jobs out there for general purpose languages only occupying a niche of the total number of programming jobs. Becoming an expert in one of those narrowly used in paid jobs languages is a hobby and not a career move.

    Case in point: Search for jobs where Ruby is the main programming language versus Cobol jobs. Cobol's been on the skids since the middle 1980s and has more jobs than many of the once over hyped programming languages of the 90s and 2000s.

    Blogs, magazines, podcasts, etc. have space to fill and it's much easier to cover the new language, library or tool of the month versus giving in depth information on a well established technology. It's why many sites gravitate to a list of links to what essentially are press releases or blog entries promoting the author's own project.

     

  11. LOL, C++ 2011: much simpler, safer and more by halfdan+the+black · · Score: 2

    LOL, C++11 has made said made C++ "much simpler, safer and more expressive." That's got to be one of the most bizarre statements I've ever read.

    More like template meta-programming has increased the language complexity by several orders of magnitude. At least you could step through pre-templatized C++ and understand control flow. With these template meta-programming, the language is completely and utterly incomprehensible, they've truly made it a "write only" language. Case in point, take a look at Eigen.

    No, C++ just needs to die, the standards committee just can't seem to figure out how to simply the language, and please the meta programming language geeks. C++ needs to die and get replaced by something like Go or Rust.

  12. Golang is the future by skinlayers · · Score: 3

    C++'s days are numbered.

    https://en.wikipedia.org/wiki/...

    "The designers were primarily motivated by their shared dislike of C++."

    References:
    "Dr. Dobb's: Interview with Ken Thompson": http://www.drdobbs.com/open-so...

    "Less is exponentially more": http://commandcenter.blogspot....

    ""The Evolution of Go": https://talks.golang.org/2015/...

    And I'm not the only one who agrees.

    "Why ESR Hates C++, Respects Java, and Thinks Go (But Not Rust) Will Replace C"
    https://slashdot.org/story/334...

    1. Re:Golang is the future by serviscope_minor · · Score: 2

      C++'s days are numbered.

      Techincally everything's days are numbered.

      "The designers were primarily motivated by their shared dislike of C++."

      Euch. You could insert "irrational" or "misinformed" into that sentnce. I use C++ a lot. I could give you a long list of complaints about it. A very long list. There are things I'd love to see fixed, or a "better" language replace it.

      That language isn't golang.

      In fact that article you posted:

      "Less is exponentially more": http://commandcenter.blogspot....

      Basically degenerates into a whiny rant about go is too awesome for C++ programmers and that's why C++ programmers have been pretty uninterested in go. It seems he can't really cope with the possibility that go isn't that amazing and certainly doesn't cover as many use cases as C++.

      "Why ESR Hates C++, Respects Java, and Thinks Go (But Not Rust) Will Replace C"

      Yeah well, ESR is a bit of a plonker. What are you going to post next? His guide to sex? (no realy this is a thing http://www.catb.org/esr/writin...)

      --
      SJW n. One who posts facts.
  13. Re:Interesting. Excellent point. by TheRaven64 · · Score: 2

    If you're starting with -Os, then your baseline is optimising for size, so presumably that's what you care about. To beat it you need to either remove instructions entirely, replace multiple instructions with a shorter sequence, or pick instructions with shorter encodings. All of these are things that are really easy to automate. Most of the bloat comes from ABI constraints, and if you pass the right flags the compiler will ignore these (e.g. omitting the frame pointer).

    If you're optimising for speed, then start with -O3. At this point the compiler has already done things like loop rotation, common subexpression elimination, and autovectorisation. You might be able to beat it, but even understanding what the code is doing for a nontrivial example is quite hard.

    --
    I am TheRaven on Soylent News