Type Erasure in Rust

Rust traits have the neat property where you can use them either as generic bounds or as dynamic dispatch, with the &dyn MyTrait syntax. The latter is necessary in heterogeneous scenarios, where you want to use multiple concrete types together that all implement a common trait. However, that requires that you have an instance, so that the reference actually “refers” to something. What if you have a trait with “static” requirements, like consts or methods without &self?

Soft Orders of Magnitude

If there’s one safe thing to complain about for any software development process, it’s that build times are too long. It doesn’t matter if it’s a minute, five minutes, or a hour—it could always be shorter. No one’s going to argue with that, right?

What we came to realize was that absolute or percentage speedups, while obviously important, weren’t going to change how someone used the tool unless it crossed a “soft order of magnitude”.

There's No Such Thing As "Implicitly Atomic"

If I have an aligned machine-word-sized variable (Int) and I store to it from Thread A, then I know Thread B might see the old value instead of the new value (because of per-processor caching, or the compiler “hoisting” a load to earlier in the function). But there’s no way, on a modern processor, that Thread B sees a mix of the old and new value, right? That can only happen with wider values, or unaligned values, that the code may update non-atomically, right?