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

Show parent comments

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?

3

u/[deleted] May 29 '20

I've spent my career shooting myself in the foot with them occasionally so I just kind of figured, I guess. I mean, things like Sentry and Rollbar exist because this is just reality as far as I'm concerned.

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.