Rustacean Station  cover image

What's New in Rust 1.40

Rustacean Station

00:00

Is the Commododot Pattern a Trait Off?

The comma datat pattern lets you mark your type as something where the compiler is going to enforce that people who match on your type must use the commododot pattern. And so this means that you can now add more variants and know that you want, you won't make users code not compile just because you added a field or variant. Some users really enjoy the idea of o i've covered every single case, and nothing can go wrong. They don't need a default case or like, a fall through back up case. I think that's definitely true both for structs and for enoms, but perhaps especially for enom where this sort of the compilation checking that you're matching exhaust

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app