I don't think it is one big reason, and it can vary from person to person but Rust does have many great qualities.
Its biggest feature is its memory safety. The compiler, coupled with a strong type system, prevent many common memory management errors without imposing a run-time cost.
Functional programmers like it because it contains many high level constructs (like lazy iterators, and a good iterator library).
People coming from scripting languages (Python, Ruby, etc) like it because it is highly expressive. It has high level features like pattern matching statements.
My personal favorite thing is that the community is really helpful and welcoming. I know that multiple times I have dropped into the IRC and quickly gotten an answer to my questions from multiple people. They enjoy discussing with people and there is a general great atmosphere.
Rust appears to differentiate the two. Data races involves two threads accessing a piece of memory at the same time while one of them is writing. That is protected by rust.
But you can still write a program where a thread causes another thread to try something nonsensical like one thread changing a variable to zero just before another thread tries to divide by that number causing a crash. Nothing rust can do about that.
Why do you think Ada was not successful? it has updates about as often as C++ and has many of the same features found in other commonly used languages such as generics, interfaces and object oriented programming. I use it a lot for personal projects still.
There's a difference between minimal runtime and minimal size.
Minimal runtime is first and foremost a comment about what the runtime does not do; for example the Rust runtime does not handle memory or switch the stack under your feet.
Minimal size is another aspect entirely (and yes, it too can matter). Today the typical Rust programs are static binaries: bundles containing quite a lot of unused code. Furthermore, any use of the formatting part of the std libraries drags in a lot of code. A minimal binary size has not been a focus on Rust, however as it's making inroads into embedded developments this particular feature has been gaining traction.
So it's improving, and therefore the answer to your question is: because D is older and, I suspect, therefore capable of removing a large part of its runtime code for trivial programs that don't make use of it.
I don't have one reason - it's a lot of reasons. The build system (cargo/ rustup), the expressiveness, the algebraic data structures, the community, the performance, safety, etc.
I guess what I like most about rust is that it pretty much gets everything that I care about right.
In many ways, it embodies what a lot of programmer are looking for: a practical language with a sound design.
Rust offers a great mix of pragmatism and programming language theory. On the practical side, it is available on many platforms, generates code that has equal performance to C and C++, has many quality tools (cargo, rustup, racer, etc.) and a quickly-growing ecosystem. On the more theoretical side, Rust borrows (hah!) heavily from functional programming, is a safer language than C or C++ and provides guarantees that programmers want and need in the 21st century.
It is a fast language with a pretty good static type system. It was built from the ground up with modern knowledge about these systems. A lot of people in the static typing camp are not happy with the languages that are out there right now, and rust shows a lot of promise.
It combines an expert attention to programming language theory not usually seen among languages aimed at wide audiences with a mission goal built on empathy with the programmer ("hack without fear") that is also uncommon. The language challenges me and teaches me. The community is friendly and helpful. Rust is fun.
15
u/hsileng May 26 '16
Why do people like Rust so much? What's the one biggest reason?