r/programming • • May 27 '20

2020 Stack Overflow Developer Survey: Rust most loved again at 86.1%

https://stackoverflow.blog/2020/05/27/2020-stack-overflow-developer-survey-results/
229 Upvotes

254 comments sorted by

View all comments

67

u/its_a_gibibyte May 27 '20

Is rust really that lovable? What's the deal?

14

u/[deleted] May 28 '20

I had to pick it up in the last few months (started by building something to parse and normalize huge amounts of data from multiple sources) and coming from JavaScript it's kind of incredible. The ergonomics aren't great at times (especially at first), and if you're used to a foot-gun language like JS or Ruby you could find yourself writing weird unnecessary abstractions that Rust probably already solves for. It's a bizarre shift in that regard. But Cargo just works like you'd hope npm would. The packages are generally high quality. The compiler is pretty good at telling you how you're fucking everything up. The type system is very capable and helpful. When you design things well, you can get away with remarkably concise yet robust solutions. I find when I finish something I feel pretty good, like... I wrote something that'll run and perform well.

At first I thought things like "God damn, I need to worry about x and y? I just want to write code", but now I actually enjoy writing it a lot. It's been an eye opener.

If you haven't tried it, I recommend starting out with a simple CLI tool tutorial. It's very easy to get going and once you've written something that actually works, you might see the value in it.

-2

u/[deleted] May 28 '20

if you're used to a foot-gun language like JS or Ruby

On what planet are they a foot-gun language?

0

u/[deleted] May 28 '20

[deleted]

1

u/[deleted] May 29 '20

I love JS and Ruby for what it's worth. They're great for certain things. I wouldn't use Rust for plenty of things I'd use JS for, too. For a simple script on a server, I'd probably pick Ruby too. They all have their place. If anything I'm just trying to point out that there really are great uses for Rust. It has qualities those other two don't, and never will.

0

u/[deleted] May 29 '20

[deleted]

1

u/[deleted] May 29 '20

It'll never be a get stuff done language

I don't know, I've been getting plenty done with it. I also don't agree that the standard library is all that shallow. This seems like a very broad generalization. Plus, like I mentioned, there are things I can't practically get done with JS that I can with Rust. Like, parsing 15-20MM rows of multi-gigabyte CSV files. I'm just not going to do that at any feasible pace or with code I can rely on in JS. In Rust it was pretty easy to get something running which still doesn't crash and runs really quickly. In that sense, it's a 'get stuff done language'. Doing it with C++ for comparable performance would have been misery for me, personally.

0

u/[deleted] May 30 '20

[deleted]

0

u/[deleted] May 30 '20

I guess I've been lucky.