Why the developers who use Rust love it so much
stackoverflow.blog
stackoverflow.blog
A couple thoughts on this point, speaking as an admitted Rust fan:
- A lot of this has gotten better since "non-lexical lifetimes" were stabilized. In particular, it used to be somewhat common to need extra pairs of nested curly braces, to convince the borrow checker that some reference you'd taken really wasn't going to be used again. But today that is almost never necessary.
- In some cases, I find Rust's safety-oriented APIs clearer and nicer than their equivalents in other languages. For me, the big one is Mutex<T>. In Rust, a Mutex is a container, and you can only access its contents by locking it. It's impossible to forget to lock a Mutex when you access the thing it protects.
a lot of us who don’t like that almost every new language turned into a jitted or interpreted universe like Go and Rust
I get that some developers believe that Rust is "better than Ruby" and that Rust has far more momentum, but their use cases are very different.
Long may that continue, elixir/phoenix is really good stuff.
Both are completely fair.
Not going to claim my anecdotal evidence is universal -- just adding a data point.
I think Rust managed to also cultivate a community that was very much like Ruby’s [1], which brought people over.
[0] cf. Klabnik’s “Rust for Rubyists”
[1] mostly being very “people-oriented” in terms of inclusivity and documentation, as well as putting effort into ensuring that the language and its tooling provide a lot of “developer happiness”
Fundamentally, I don't think it should be surprising that someone who loves Ruby would look at Rust. That it's very different is the entire point! Why learn something that's extremely similar, that won't expand what you can do very much?
I can't speak for Rubyists, but I find it a very strong complementary skill to Python, as it allows for writing things that are impractical in Python. And Rust feels friendlier as a Python-complement than C. Especially parallel C.
Receiving a compiler error in Rust is more appealing to me than debugging a segfault or race condition in C, especially since Rust will always tell me when one exists. Or more importantly, I can feel comfortable pushing new fast low-level code to production knowing it's not a risk. There's no ambiguity. "fearless concurrency" is not just a buzzword, it's partly what makes Rust fun and practical (for me). As well as the incredibly-fast start-up time of my Rust code compared to Python.
It is also appealing for Python programmers because of the increasingly-decent support for mixing the two languages without overhead, including publishing pure-Rust packages as python modules^1
These tools are in my opinion significantly better than the classical UNIX tools: they can be orders of magnitude faster, understand .gitignore, have more intuitive command-line options, and make better use of colors.