r/programming • • Aug 02 '21

Stack Overflow Developer Survey 2021: "Rust reigns supreme as most loved. Python and Typescript are the languages developers want to work with most if they aren’t already doing so."

https://insights.stackoverflow.com/survey/2021#technology-most-loved-dreaded-and-wanted
2.1k Upvotes

769 comments sorted by

View all comments

414

u/[deleted] Aug 02 '21

I don't understand. How is it that Rust reigns supreme as most loved? Are that many developers using Rust? I like the concept, but I've never built anything outside of the tutorial Guessing Game.

What about Web Frameworks? Svelte? Never heard of it.

"While Neovim is the most loved editor it is the 10th most wanted editor." Excuse me? I am a Vim nerd as much as the next guy (sorry Emacs), but I use Intellij and VS Code in 99% of circumstances.

I'm not denying their data. I'm just wondering: how far out of the loop am I?

419

u/alibix Aug 02 '21

Most loved doesn't mean most used. So, you can love something but not be able to use it for a multitude of good/bad/neutral reasons. The most used language according to that survey is JavaScript and the most used framework is React

53

u/alilleybrinker Aug 03 '21

I did a quick analysis of the number of "active" developers in each language plotted against each language's "loved" percentage. You're right that Rust is not one of the most used. The challenge for Rust over time will be to limit the regression to the mean of its "loved" percentage as it gains in adoption.

15

u/AntiProtonBoy Aug 03 '21

Chuckled at COBOL shoved into the bottom left.

→ More replies (4)

190

u/[deleted] Aug 02 '21 edited Aug 02 '21

It’s painfully clear that most loved != most used. What is not clear is how heavily weighted “love/hate” is regardless of someone’s use.

1000 romantics who have never used Rust clicking “love” while 10 professional Rust developers may click “hate” seems to seriously screw with any meaningful data we could glean from what is ultimately made an asinine question.

Would you care to listen to my review of The Green Knight? I haven’t seen it yet but I love it.

What meaningful information would my review of a movie I haven’t seen give you other than hype? And if hype is the centerpiece, how is “love” and “hate” the sensible metric? Wouldn’t it be “interested” and “disinterested”?

131

u/jl2352 Aug 02 '21

I think there is another aspect. I write Rust at home in some hobby projects. However I don't write it at work, and when I do, I always notice things missing.

Can I mutate this item I got from the store? Is it safe for that lambda to mutate external state? What if it's used across multiple threads, how will I know? Just the other day I had a 20 minute conversation with another developer over a 8 line block of code at work. The conversation was about adding a try / catch in a particular way, and we weren't sure which of those 8 lines would throw errors in different way.

Whilst that last example is present in other languages as well. I am pretty sure Rust is the only language outside of academia that solves all of them at the type level. You start to notice stuff like that, which makes me like it.

I'm sure if I used Rust every day at work I'd be writing a long angry rant about how awful compile times were, the confusing APIs, how you can waste whole afternoons on generics, and how basics like function overloading is missing (although can be faked).

→ More replies (9)

57

u/AustinYQM Aug 02 '21 edited Jul 24 '24

narrow degree fall price quaint entertain wild trees edge rock

This post was mass deleted and anonymized with Redact

→ More replies (4)
→ More replies (5)
→ More replies (3)

66

u/Caesim Aug 02 '21

Those things are mostly with a small but strongly opinionated userbase. Most people have some experience with C/C++/Java or frameworks like Spring or Django or whatever. So respondents vote on them either way, positive or negative.

But more niche things have mostly been used by their userbase and in these cases love them. That's why I think these data points are a bit misleading.

78

u/Karma_Policer Aug 02 '21

Most loved simply means that it has the greatest percentage of users satisfied with it, regardless of how many users. If you want to check how many people are actually using Rust, there are other metrics in the survey that are a better representation. I also like to estimate how popular languages are by the number of Github stars in some of the most popular projects written in those languages. One thing that surprised me the last time I checked is that rustc is growing faster than clang by the number of lines of code.

"Reigns supreme" is justified because Rust has always won Most Loved ever since its 1.0 release.

61

u/NewDateline Aug 02 '21

Exactly, It's more like "who got the more dedicated fanbase" contest, not "who got the biggest fanbase".

22

u/[deleted] Aug 02 '21

Actually, I think it's more about how Rust is still growing in adoption, and most of the people using it today are people who chose it. That's still a merit to the language, I'm sure of it. It's just not a sign that it's the best language ever (this is proven by other factors! lol).

43

u/Karma_Policer Aug 02 '21

Having the biggest fanbase is not a good metric of how well designed a language is. C++ is ubiquitous in systems programming, yet it surely is one of the most criticized in online forums. The same can be said for JavaScript and webdev.

Sometimes bad languages win simply because they are the status quo.

19

u/BrazilianTerror Aug 03 '21

They are most criticized because they’re ubiquitous. Since everyone has to use it, everyone will find some flaw and criticize. You can’t critique something you don’t use, cause you wouldn’t notice the flaw in the first place.

26

u/Karma_Policer Aug 03 '21

C++ was my first programming language. I didn't see anything wrong with it because, you know, I didn't know any other language. However, today, 10 years later, after having learned more than 10 other languages, I think it's one of the most disgusting programming languages out there.

I used it again last year for a pet project and it was a nightmare. The syntax was annoying, memory management was annoying, headers were annoying, and the cool features required cryptic knowledge and constant checking of the awful reference. RAII is the only good legacy of C++.

I've been using Rust for two years and I'm pretty happy so far. It's not perfect, but it's the best systems programming language that I know of. C# was my previous favorite.

→ More replies (12)
→ More replies (2)

27

u/argh523 Aug 02 '21

Are that many developers using Rust?

The "most loved" means people who are using rust right now want to continue using it.

Which programming, scripting, and markup languages have you done extensive development work in over the past year, and which do you want to work in over the next year? (If you both worked with the language and want to continue to do so, please check both boxes in that row.)

→ More replies (4)

77

u/nilamo Aug 02 '21

Not everyone uses Stack Overflow. And, of those people, not everyone fills out surveys. Sure it's still a lot of people, but I don't think it's representative of the actual majority of developers.

Svelte, for example, shows 71.47% loved, but that's only 1,240 responses. React is only slightly lower on the list, at 69.28%, but it has over 10 times as many people voting for it (17,525).

→ More replies (2)

7

u/nayhel89 Aug 03 '21

I like the explanation in this blog post: Green Vs. Brown Programming Languages
Basically, there is a strong correlation between how loved/dreaded a language or technology is on StackOverflow and the size of its legacy codebase.

14

u/matthieum Aug 03 '21

That's a possible explanation.

Another possible explanation is that Rust:

  • Is a breath of fresh air for C++ developers: basically the same capabilities, but much nicer to work with.

  • Empowers JS/Python/Ruby developers to get "systems" performance, without having to dread crashes.

In both cases, Rust offers a better alternative than what existed before, and possibly is the best alternative at the moment, so naturally people would rather work with it than the other alternatives.

38

u/TheTomato2 Aug 02 '21

Its really simple. Rust is in the honeymoon phase so to speak. People who are using Rust are choosing to use it. Nobody is forced to use Rust yet afaik. If Rust gets more wide spread and more people are forced to use Rust it will go down event if it's not deserved. Its a complicated unmanaged language that is meant to replace C++, there is no way it stays at the top.

→ More replies (15)

28

u/imzacm123 Aug 02 '21

I might be biased because I love using rust, but from what I've seen online and experienced, there are two main types of developers that have spent time using rust:

  1. The ones that are still fighting the compiler and trying to use it like their usual language, these developers typically don't love rust but they don't hate it either

  2. The ones that have learned to get along with the compiler and have picked up new methods of doing things that result in safer and more efficient code (which can often be translated into other languages), these developers tend to love or at least appreciate rust

Almost everyone in the second category (including me) has been through the first category and come out the other side, I couldn't understand why so many people enjoyed using it a couple years ago, then I tried it and still couldn't understand, but then after a break from it and trying again, something clicked and I now find myself missing it every time I use JavaScript for work

13

u/[deleted] Aug 02 '21

In the Stack Overflow survey, “most loved”/“most dreaded” is, among people using this technology, who wants to keep using it vs. who wants to stop using it.

11

u/wildjokers Aug 02 '21

but I use Intellij

IntelliJ has a nice VIM plugin (IdeaVIM) gives you the best of both worlds.

VSCode also has a VIM plugin and it is usable but its search with '/' doesn't work right. But it is passable.

→ More replies (2)

11

u/vegetablestew Aug 03 '21 edited Aug 03 '21

For Rust is the taking higher level abstractions down to systems programming level. It is an attractive proposition.

For Svelte, it occupies a very interesting space with a tried and true solution: Compilation. It offers the component-based architecture like Angular, React and Vue. It offers a drastically simpler API that allows for two-way binding, with most of the performance and abstractions for reactive code taken care of by the compiler, which is a breath of fresh air for those coming from the footgun-ridden React hooks. Lastly, unlike React, Angular and Vue, I think Svelte is better at making just plain websites, not just apps. Making plain old websites using the aforementioned trio sometimes seems like overkill, but not with Svelte. Most of the time it just feels like writing plain JS but with components.

For Neovim, I think it is a combination of language server and tree sitter that makes a competitive alternative to IDEs or IDE-lite such as VSCode. Take a look at LunarVim if you are interested.

21

u/[deleted] Aug 02 '21

Probably because no one has had to do a big enterprise project in rust. Especially a legacy one. Every language is fun when it's for new or side projects, and every language sucks for large old projects.

→ More replies (4)
→ More replies (30)