(1) Stare at code wondering what my new struct should look like.
(2) Make coffee and realise what fields I need.
(3) Type it out.
Which of these count as programming? (3) looks like it, but doesn't feel like it.
It took me way too long to realise that Arc<Mutex<T>> is basically a way to create multiple &mut T references (with runtime constraints).
This means that you can use plain &T and &mut T in the vast majority of your code. Most code doesn't need to care there's a mutex.
I enjoyed this interview with Lukas Wirth, one of the maintainers of rust-analyzer: https://rustacean-station.org/episode/lukas-wirth/
I didn't realise how little code was shared between rustc and rust-analyzer (only lexing and type layouts). This makes it hard to track new Rust features.
Language design question: what type should `while True {}` have?
Bottom: It doesn't contain any `break` statements.
Unit: Treat loops with/without `break` consistently.
I already have lints that warn on unreachable code after diverging loops, so the Unit case feels surprising.