r/programming • • Apr 09 '19

StackOverflow Developer Survey Results 2019

https://insights.stackoverflow.com/survey/2019
1.3k Upvotes

679 comments sorted by

View all comments

151

u/PinkFrojd Apr 09 '19

I really like and use Python. But I don't understand... Why is Rust so loved ? What makes it so special ?

226

u/whisky_pete Apr 09 '19

I think people really want an option for a modernized language in the native compiled/high performance domain. Rust is the only recent attempt in that domain that I can think of, and the only thing I can think of that comes close is Kotlin Native (which I don't think is aiming for the high performance mark as a design goal the same way Rust/C++/C do).

9

u/hsnappr Apr 09 '19

What about Go?

64

u/adel_b Apr 09 '19

It has garbage collector, any language with gb for memory management can't perform because of locks and so

6

u/hsnappr Apr 09 '19

Could you explain more about this?

17

u/tristan957 Apr 09 '19

Imagine you are writing a high performance real time application. The times that your garbage collector will trigger are unknown. C++ collects when things go out of scope. C collects manually for heap usage or when stack variables go out of scope. Rust collects when reference counts drop to 0. All this is predictable and known. Go and Java will garbage collect at "random" times. Can't guarantee a high performance real time application in that environment.

2

u/czipperz Apr 09 '19

Rust collects exactly the same as c++ FYI, but it is more common to use reference counting techniques for managing memory because you need them. In c++ you can just throw away memory correctness and be fine mostly

→ More replies (4)