News for hackers. Stuff that matters.
Re:Cloudflare outage on November 18, 2025 post mortem by frumplestlatz on Thursday November 20, 2025 @01:58PM (#45996281)
> You use `unwrap()` when you know the failure cannot happen.

That’s an invariant meant to be expressed by your type system — and it is.

You’ve failed to model your invariants in your API — and thus the type system — if you ever reach a point where an engineer has to manually assess and assert whether “cannot” applies.

You will get it wrong. That is bad code.

Re:Cloudflare outage on November 18, 2025 post mortem by burntsushi on Wednesday November 26, 2025 @02:11PM (#46061223)
You can't model all invariants in the type system. My blog even shows examples of this too.