TWiR quote of the week


From: Why does `ref` in a function parameter move out of the ownership of the argument? - #39 by CAD97

Place disjointedness analysis projecting through slice indexing truly is the gift that keeps on giving when it comes to weird code being accepted, isn't it.



Yours truly on twitter:

Claiming Rust won't help you because you're doing so many unsafe things is like claiming protective gear won't help you because you're handling so many dangerous substances.


@SkiFire13 in Problems with field ref in struct - #14 by SkiFire13 :


From this toot by Isaac Lyman:

JavaScript is garbage-collected but if you don't think about addresses, reference equality, memory leaks, etc., you write bugs that are hard to fix. You still have to think about memory, but it's invisible.

In Rust, those things are in your face all the time.

(The whole context delivers the point better, but I think it would be too big for a quote.)


From this toot by Jacob Lewallen:

Rust makes programming feel more like solving a puzzle than any other language I've used. I've never trusted a compiler more.


From dannersy on hackernews:

in Rust, it's just me and the problem



@DanielKeep with some profound wisdom (and a valid exception to the rule :smile:):


I just want to be convinced before adding a feature that it’s necessary

Herb Sutter in Keynote: The Evolution of C++ - A Typescript for C++ - CppNow 2023.

Even if this quote isn’t directly about Rust I find it a very useful general advice.

1 Like

The context makes this much better:

In [other languages], I could end up chasing silly bugs and waste time debugging and tracing to find that I made a typo or ran into a language quirk that gave me an unexpected nil pointer. That situation is almost non-existent in Rust, it's just me and the problem. Rust is honest and upfront about its quirks and will yell at you about it before you have a hard to find bug in production.

(just so this post is self-contained: source)


Rusts standard library, and a lot of the popular crates, are like a museum. While it does change, as new exhibitions are added, it is mostly finished. Each painting has a detailed explanation in 7 different languages underneath. Descriptions below each excitation are written beautifully, with detailed drawings, showing how everything works. It is so easy to navigate, one glance at the map is enough to find exactly what you are looking for. It is so convenient, you almost don't notice that you are learning something.

Internals of rustc are like a build site of a sprawling factory. You can see the scaffolds everywhere, as more production lines come online, and everything gets faster, better, bigger. Workers move around, knowing the place like the back of their hands. They can glance at the signs on the walls, and instantly tell you: where you are, what this place does and what pitfalls you should avoid. And you are a new hire who has just came for his first day at the new job. You look at the sign, and after some thinking, you too are able to tell roughly in which building you are. The signs almost always tell you what you need, just in short, cryptic sentences. You always can tell what is going on, with some thinking, but it is not effortless. The signs on the walls are not bad, just not written for anyone to get right away.



Is it okay to submit year old quote?

We’re already seeing a shift from a focus on pure language semantics with syntax and editor tooling seen as side projects, to a focus on usability and tooling. Rust is semantically an OCaml with typeclasses, affine types, and unboxed types. What keeps Rust from being an Inria PhD student’s thesis that nobody uses is its focus on tooling, good compiler diagnostics, and ecosystem. I’d like to see some language implementors having that focus from the beginning

source: Tooling for Tooling - , emphasis mine


By obi1kenobi:

It's very much a positive feedback loop: good tooling makes good tooling easier to build, so more of it gets built and the cycle repeats.
cargo-semver-checks stands on the shoulders of giants like rustc and rustdoc and Trustfall. Remove any one of them (or even just rustc's high-quality diagnostics!) and cargo-semver-checks wouldn't have been a viable project at all.


By @0xMB here in URLO:

This is the first programming language I've learned that makes it so easy to make test cases! It's actually a pleasure to implement them.


The problem with Rust it appears,
that it leaves programmers in tears
if they have to go back
to languages that lack
in short they've got feature-arrears.

by @llogiq on r/rust, commenting on a post titled “I never want to return to Python”.


The Rust mission -- let you write software that's fast and correct, productively -- has never been more alive. So next Rustconf, I plan to celebrate:

  • All the buffer overflows I didn't create, thanks to Rust
  • All the unit tests I didn't have to write, thanks to its type system
  • All the null checks I didn't have to write thanks to Option and Result
  • All the JS I didn't have to write thanks to WebAssembly
  • All the impossible states I didn't have to assert "This can never actually happen"
  • All the JSON field keys I didn't have to manually type in thanks to Serde
  • All the missing SQL column bugs I caught at compiletime thanks to Diesel
  • All the race conditions I never had to worry about thanks to the borrow checker
  • All the connections I can accept concurrently thanks to Tokio
  • All the formatting comments I didn't have to leave on PRs thanks to Rustfmt
  • All the performance footguns I didn't create thanks to Clippy

Adam Chalmers in Rustconf 2023 recap


There is no simple way to writing correct code, you just can have a compiler that helps you or not, those are our options at the moment.


The default answer to all feature requests is "no, make a library"

@scottmcm in How to suggest a feature to be added to rust compiler - #3 by scottmcm


When your #Rust build times get slower after adding some procedural macros:

We call that the syn tax :ferris: