A fast executing language that crashes all the time is like a supercar… that crashes all the time.
Rust is weirdly all-level programming language. You literally can have pointer arithmetic, iterator transformations, and inline python macro back to back in the same function.
If your code is expected to be a bottleneck in terms of CPU usage, memory usage, latency or bug-fixing, then Rust is a very strong contender. It can save you money and effort in the long run.
From Pinecone's "Inside the Pinecone" article on their transition from Python, C/C++, and Go to Rust, by Edo Liberty (bold emphasis mine):
[W]e reached a tipping point. We decided to move our entire codebase to Rust... . Rust seemed to give us all the capabilities we needed, however, there was still one minor problem - no one on the team knew Rust. ...
We started with a small team of senior engineers and managers learning Rust and developing the skeleton of the DB and dev environment (for others to build on). Then, slowly, others joined in rewriting and contributing different components until we eventually got rid of the old codebase altogether (I still remember the day my original C modules, from the first days of Pinecone, were taken out). Unbeknownst to most Pinecone customers, the new Rust core was deployed in March this year. And in the process of taking over running workloads, we managed not to drop a single API call!
... We all expect[ed] performance and dev processes to improve. Those indeed happened. What we didn’t expect was the extent to which dev velocity increased and operational incidents decreased. Dev velocity ... improved dramatically with Rust. Built-in testing, CI/CD, benchmarking, and an overzealous compiler increased engineers’ confidence in pushing changes, and enabled them to work on the same code sections and contribute simultaneously without breaking the code base. Most impressively though, real time operational events dropped almost to zero overnight after the original release. Sure, there are still surprises here and there but, by and large, the core engine has been shockingly stable and predictable.
Thank you very much! It's good to see another Rust user who understands that true skill in the art comes not from idiomatic code, or from building relations with the community, but rather from the number of references to the
Pintype that a developer feels comfortable making.
From the community that brought you the Pre-RFC and the e-RFC, we now introduce: the de-RFC!
Make sure to check out the creatively named section headings in the actual rendered contents, too .
So long, and thanks for all the turbofish.
https://www.reddit.com/r/rust/comments/wzuoqz/comment/im4pek6/ , in response to the deprecation of RLS
In Rust We Trust
GATs incresses the overton window of what one thinks is possible. So, a forcing function indeed.
estebank reads other people's mind, that's why he's so good at writing helpful compiler errors.
Context: in response to the Rust for Linux folks building and presenting an NVMe driver that's roughly at parity with the performance of the C driver.
Hi, I'm Matthew Wilcox, co-author of the NVMe spec and the troublemaker who said 'you need to do an NVMe driver and then I'll believe that Rust is ready for use in the kernel.' You have succeeded far beyond my expectations, both of you, all of you, thank you so much, you've done a fantastic job. I was not expecting to see these performance numbers, they are amazing.
[The] difficulty lies in an unfamiliarity with a memory model that challenges 50 years of running by the pool with scissors. There will always be a demand for programmers who know how memory works, and there will always be people who garbage collector go brrr.
— Guilty-Speaker7044 on reddit
To me, a defining property of Rust is that it never gives that "I'm not in control here, the language is" feeling.
Which is a very odd statement to my mind. Because Rust exercises great control over many things, thus stopping us writing code that mysteriously crashes, eats memory or produces erroneous results at random.
I think it's because the type system is "a relatable master", while the thought processes of the optimizer, when we're allowed to observe them having unexpected effects, are that of an eldritch abomination.
Speaking of languages, it's time to halt starting any new projects in C/C++ and use Rust for those scenarios where a non-GC language is required. For the sake of security and reliability. the industry should declare those languages as deprecated.
— Mark Russinovich, CTO of Microsoft Azure
it's not Perl
Linus Torvalds complimenting Rust, source: Next steps for Rust in the kernel [LWN.net]
Rust isn't that terrible
Also Torvalds, from the same quote as above. This is high praise indeed coming from Linus.
I would say the benefits I saw from the start were that you didn’t have to think about race conditions and memory corruption, and memory safety in general. You know, just writing correct and robust code from the start. So that was basically my first impression, but now I have also come to realize that there are many other aspects. You get just as big benefits from the side effects of that first aspect.