
What's New in Rust 1.40
Rustacean Station
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
00:00
Transcript
Play full episode
Remember Everything You Learn from Podcasts
Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.