back to article In Rust, we lust: Security-focused super-C++ language still most loved among Stack Overflow denizens

Rust for the fifth year in a row has held its position as the most-loved programming language in Stack Overflow's annual developer survey, even if it's not the primary language for most programmers and not many jobs require it. Rust, beloved by 86 per cent of respondents this year, recently celebrated five years since its 1.0 …

  1. the spectacularly refined chap

    Basically tells you all you need to know about Stack Overflow users...

    An obsession with the new and shiny coupled with a lack of any depth of knowledge and a healthy dose of bullshit.

    Three quarters of SO respondents use assembler and hate it? I doubt three quarters of them would be able to name an assembler.

    1. Tobu

      Re: Basically tells you all you need to know about Stack Overflow users...

      No, that's the proportion among respondents who regularly write assembly who hate doing so.

    2. Anonymous Coward
      WTF?

      Re: Basically tells you all you need to know about Stack Overflow users...

      It's less Stack Overflow users and more the relevance of the beauty contest.

      In Stack Overflow's most used programming language ranking, Rust comes in at 19th. The top five are JavaScript, HTML/CSS (and let's not rehash the discussion of a few weeks ago about whether this is a programming language), SQL, Python, and Java.

    3. bombastic bob Silver badge
      Meh

      Re: Basically tells you all you need to know about Stack Overflow users...

      According to the article: Those taking the survey are not a particularly diverse group

      There is more than one kind of 'diversity' in my view, particularly when doing a sample for surveys, which is actually more along the lines of "representative sample" vs "whatever they had". If the sample represents Stack Overflow, then I suppose it MIGHT be a good survey.

      But as for programming languages in general, I tend to believe TIOBE, if for no other reason than they've been doing this a while and have a pretty scientific way [it seems] of getting programming lingo popularity out of whatever data set they use. interestingly, C jumped over Java a bit this month (Java was neck/neck #1 vs C #2 for quite a while again) and so Java and C run close to one another in popularity and continue to do so.

      As for Rust it was down at 21 on the TIOBE index, with a 0.7% rating. By comparison, C is around 17% and Java around 16.3%. Next in line are Python (~9.1%), C++ (disappointing 6.1%), and C-pound (4.3%). javascript is around 2.7%. And so on [for others you can visit tiobe.com/tiobe-index - pasting a link brought up CAPTCHA so I stated it as text instead].

      In any case when you see survey results that are "this different" it makes you wonder how accurate the survey is.

      1. richardcox13

        Re: Basically tells you all you need to know about Stack Overflow users...

        > I tend to believe TIOBE, i

        Only if you want to see what employers think they want (which will largely be their legacy systems, combined with some bait and switch).

        If you read the notes around the SO survey you'll find ~3% (IIRC) of respondents are using Rust. But a lot more of the respondents would like the opportunity to use Rust.

  2. AMBxx Silver badge
    Facepalm

    Latest shiny

    I remember at Microsoft's developer conference in about 2005, the presenter asked who in the audience used C#, then who used VB. Nobody admitted to using VB preferring the shinier and better respected C#. They were all lying too.

    1. Version 1.0 Silver badge
      Happy

      Re: Latest shiny

      Rust is C++ in a lock-down - it's not bad but it has its issues too.

  3. Tom 7

    Obligitory XKCD

    https://xkcd.com/2309/

  4. James 47

    C++ is unfortunately doomed. A lot of fantasic work went in to C++11 and beyond but it's a dying language. Memory safety issues aside (which should have been largely solved by RAII), it's too complex (there are 5 ways to initialise a variable, xvalues, glvalues, prvalues, lvalues, rvalues), its networking framework is too much but also too little and there's zero mention of unicode. I get the feeling that companies like MS, Google and Mozilla are of the opinion that trying to fix their broken C++ code is too much effort when they could just rewrite in Rust.

    I'm not a fan of the visual look of Rust source code but I think it'll become a desired skill if not by its merits, but by the herd wanting to use it.

    1. ThomH

      On the other hand, C++ is one of the few languages to have a genuine standardisation process which tends to mean that additions and changes are thoroughly vetted and which helps to avoid breakages and sudden ideological lurches even if it introduces redundancies and absurd committee linguistics.

      If you had to pick between C++ and Rust for a codebase you expect to last, say, twenty years, there might be an argument for being more suspicious of Rust than C++.

      1. James 47

        Yes, it has a standardisation process.. that's glacially slow. I can't really complain though since they're all volunteers. And I've no doubt there'll be C++ code bases around in 20 years... parked for maintenance only, just like COBOL. No young dev should waste their time learning C++.

        1. Rich 2 Silver badge

          I don’t think establishing a new version of C++ every 3 years is bad going. From an engineering perspective, this is much more preferable to something that jumps on the band wagon de jour only to abandon it a couple of years later when the next whizzy thing strolls along.

          1. parperback parper

            A new version every 3 years is the kind of ridiculous instability you expect in the younger languages.

            1. Teiwaz

              A new version every 3 years is the kind of ridiculous instability you expect in the younger languages.

              On the other hand, I've not heard C++ ever suffering the same sort of new version adoption roadblock (for want of a better term) the likes of which is still going on Python 2 to Python 3.

              1. bombastic bob Silver badge
                Devil

                C++ and backwards compatibility

                with the exception of 'auto' and some other minor 'nits', C++ code using the old style from the early days SHOULD still compile and run as expected, even with the newest/shiniest C++ standard supported by the compiler.

                (At least I haven't run into anything, though a few sloppy constructs "you used to get away with" might cause a bit of grief and require some fixin' with things like explicit casts and proper rvalue/lvalue handling).

                Can't say the same thing about Python 2 to 3, now can we??

            2. Rich 2 Silver badge

              Yep

              I sort of agree. But because of the efforts that are gone to to maintain backward comparability, on the whole, I don’t think it’s a big issue.

              Except it makes keeping up with it a full time job.

              Actually - yes you’re right - it’s too often!

              1. Tom 7

                Re: Yep

                "Except it makes keeping up with it a full time job." Really? I tend to read through the new features from time to time and if I've a use for them it doesnt take long to get your head round them

    2. Rich 2 Silver badge

      Five ways to initialise a variable?

      C++ has much more than just five ways :-)

      http://knockknock.org.uk/igor.html#initialisation

      I like C++. I like it a lot. But I agree - it is much too complicated

      1. Anonymous Coward
        Meh

        Re: Five ways to initialise a variable?

        > http://knockknock.org.uk/igor.html#initialisation

        I just looked at the first 20 lines of that and it's completely wrong already.

      2. Tom 7

        Re: Five ways to initialise a variable?

        No - its as complicated as needed and no more. Computing is complicated, C++ doesnt try to pretend it isn't.

        1. Garfunkle

          Re: Five ways to initialise a variable?

          I agree. Computing isn't necessarily complex. But the goal of C++ is to allow you to build systems that _are_ complex. It requires that it provides powerful abstraction mechanisms, such as the template system. Also, a goal of C++ is to allow you to write performant programs, where you always know that you _can_ get close to the metal if you really need to. I think it's the combination of these two things that, more or less automatically, leads to the inherent complexity of C++. It's, as you say, as complex as it needs to be, for the purpose that it's aiming to fulfill.

        2. AChris

          Re: Five ways to initialise a variable?

          Finally someone who's able to tell it like it is. I can't for my lige figure out these whiners who base their premise on incompetence and still think that they are qualified to comment on why C++ would be bad. I have nowhere seen any of those pseudo programmers actually present what is that overly complicated. I have heard noobs and lazy asses complain about how it's apparently difficult to manage memory.. which it isn't if you spend 5 mins learning how it works. If people do not have the brain capacity to learn computing, then they better stay away from it rather than pretending like it should be easier. You don't hear this in most other STEM fields for some reason. "2+2 is too complicated therefore we should make everything equal 3". Imagine those people being in charge of anything important.

    3. J27

      C++ isn't elegant or beautiful, but it is popular, reasonably productive and widespread. So regardless of its issues I don't think it's dying any time soon. Rust may slowly usurp the market, or it might die out like so many prospective replacements have. That's the problem with the "new hotness". There is always something newer or hotter.

  5. Anonymous Coward
    Anonymous Coward

    StackOverflow is really slanted towards web/corporate dev

    I find little there for the embedded world.

    (On the other hand, StackExchange has all sorts of interesting stuff.)

  6. Tobu

    No, that's the proportion among respondents who regularly code in assembly.

    The same is true for Rust; it's the most loved among those who use it.

    On the other hand, the most wanted stat accounts for non users.

  7. cornetman Silver badge

    > Those taking the survey are not a particularly diverse group: 68.3 per cent of respondents identified as being white or of European descent. Just 12 per cent identified as female or non-binary.

    Do we have any figures as to how representative this is of the programming population at large? I would have thought that would be a useful measure.

    Without context, that observation is pretty meaningless.

    If we did a similar survey of nurses, we would not be at all surprised if the vast majority of the respondents were white women.

  8. Falmari Silver badge
    Meh

    I wonder

    From the article “The most loved category in the survey of 65,000 developers reflects the percentage of coders using the technology in some capacity who want to continue doing so.”

    I wonder is that truly representative of language use or even love.

    The reason for using the site is to get answers on how to do something. By their nature newer languages or languages that have started to become popular will have more questions therefore causing the site to have more active users of those languages.

    Whereas users of older more established languages will have less need for the site due to the depth of knowledge of the programmer and those around them and the size of their code base to look for an example of how to do something.

  9. HAL-9000

    I'm currently reading a Rust Noobs book, so this means it's a worthwhile endeavour yes?

    1. Brian Miller

      It's a worthwhile endeavor if you think it is. Really, people learn all kinds of languages. It's a different perspective on how to do things. I learned Rust using the online tutorials, then I went and implemented N-Queens solution and a more complex dining philosophers solution. Do I use Rust at work? No, but I would like to do so. I think it's a decent language, although the lifetimes stuff can be a PITA.

      Learn it, use it, and implement something. Have some fun!

    2. Tom 7

      Learning any programming language is a worthwhile endeavour. You may never write a line of code in it in anger but it will make whatever language you may write in easier so long as you dont get all proprietary. Remember a bad programmer always blames the language but when it boils down to it its all just machine code!

      1. ICL1900-G3

        Agreed. I'm in my dotage, but learning C++ and Rust for the craic. Still prefer assembler, though!

  10. E 5

    Ada2012 FTW.

  11. Davicious

    Lies, damn lies and statistics

    "Those taking the survey are not a particularly diverse group: 68.3 per cent of respondents identified as being white or of European descent. Just 12 per cent identified as female or non-binary"

    Whatever that phrase have to do with programming, I fail to understand.

    I tend to believe that "real programmers" don't do their jobs with the color of their skin or their genital, but in times like these, who knows.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like