nikomatsakis
banner
nikomatsakis.com
nikomatsakis
@nikomatsakis.com
Weird Al meets Grace Hopper. Rustacean. He/him.

I work for @AWSCloud. Opinions on twitter and elsewhere are my own.
yeah, it seems like the message should really be something like "expectation failed: ..."
November 21, 2025 at 4:52 PM
Why? I at least usually want the panic to propagate, it’s kind of the whole point, to have actors that propagate the failure out to “infected” actors. The key is recovering :)
November 20, 2025 at 5:55 PM
Actually I kind of dislike “or panic with”— the convention I find most readable is when people say eg foo.lock().expect(“not poisoned”) which conveys to me WHY it is ok. I think “or panic with” would push you to the opposite framing and I find that harder to think about.
November 19, 2025 at 3:37 PM
I agree “or panic” is better but my preference continues to be something like “assert_some”. I find that conveys the time when it is appropriate to use and connects it to the assert! macro (which can also panic…).
November 19, 2025 at 3:34 PM
Sadly no, not really. I’d love to see what you’ve done though!
November 18, 2025 at 10:51 AM
…hello prompt injection attacks :P
November 13, 2025 at 5:52 PM
I used to think that but it doesn’t work with the closure treatment. The whole point in some sense is to not require distinguishing “closure creation” and “closure invocation”. So if you just say it once, we need to automatic remove the other call… and then we can do it elsewhere.
November 12, 2025 at 11:58 AM
But then again...maybe alias? · baby steps
smallcultfollowing.com
November 5, 2025 at 2:30 PM
I don't see it that way at all. I think Handle has value *particularly* when you make it explicit, because otherwise `x.clone()` is quite ambiguous in terms of what it does. You really have to know the type of `x`.
October 13, 2025 at 11:44 AM
You would be calling `handle` directly though...? Or at least some folks would. I agree with Carl's critique but I couldn't up with a suggestion I liked *more*, and I felt there was definite value in introducing the term "handle".
October 8, 2025 at 4:50 PM
People need to be able to review but the onboarding costs are much lower. I can understand French surprisingly well but speaking it is much harder.
June 6, 2025 at 9:24 PM