AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
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