FWIW I had a similar "grass is always greener" bias toward various languages over the decades. But I think this isn't one of the primary contributing factors to this phenomenon. If it were, we might expect some of the newer languages to come out on top in these surveys, right?
I can make an observation that I think will hold true for many (if not most) of the people who claim Rust is their most loved language. It's akin to wandering around in complete darkness for an entire career, and suddenly being enlightened to two facts:
- You are not perfect. You will make mistakes. Those mistakes will cause you a lot of problems.
- It doesn't have to be this way.
Tangentially, I see a common dissent where some proclaim that they are in fact perfect, and that they do write flawless code, and everything is peachy, and they can't understand why everyone else is so interested in Rust. I do not claim to speak for these people, nor am I particularly familiar with their experience, credentials, or accolades. But it's clear to this old goat that these are the people who haven't yet learned that the problem is not strictly themselves; it's everyone else. It's a problem of economy of scale.
The collective noun "you" as used in my list of facts is referencing an entire audience; not just an individual. In other words, I myself could write flawless and bug-free code in isolation if I had the time and energy to pay attention to every minute detail and meticulously hand-craft every beautiful line regardless of the language or implementation details. But that doesn't matter. Once I start depending on code written by other people or new contributors come along and make modifications, all of my so-called guarantees of perfection are now incompatible with reality. "Correctness by convention" does not scale.
No matter how much after-the-fact tooling and process rigidity you have, conventions will have faults and impractical amounts of time and energy will be spent trying to automate a bandaid that should not exist in the first place. It's the second of the two facts that is the truly remarkable part of the discovery process. The "aha!" moment is realizing that one can actually get much stronger guarantees by baking those same conventions directly into the language and compiler.
You can't sacrifice memory safety, type safety, or data race safety. In many languages these are either optional or there is no way to make such guarantees. But they are all required in Rust. To top it off, you can also get performance equivalent to that of finely tuned hand-written assembly, if you so desire. You can have your cake and eat it too! The remaining features of the language are truly the icing on this sweet recipe.
Or to sum it up, Rust is the only language that ticks all the boxes:
- Memory safe
- Type safe
- Data race-free
- Ahead-of-time compiled
- Built on and encourages zero-cost abstractions
- Minimal runtime (no stop-the-world garbage collection, no JIT compiler, no VM)
- Low memory footprint (programs run in resource constrained-environments like small microcontrollers)
- Targets bare-metal (e.g. write an OS kernel or device driver; use Rust as a "high level assembler")
Beyond safety and performance, we have: Generics; Traits; Algebraic types; Functional and imperative paradigms; Perhaps the world's best dependency management and build tool which has practically solved the "dependency hell" problem; Fantastic support for inline documentation, tests, and benchmarks; A large and growing ecosystem of libraries, abstractions, and tools; Procedural macros; FFI interoperability with existing code; Support for dozens of platforms (with more on the way!); And a developer experience that is just wholesome and unquestionably satisfying. All of these contribute to what makes Rust a very appealing language.