AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
Using Patterns in a Pattern Context?
The most common case for this is a, you have astruct of some type, and you wan to look at just one field of that struct a. And so it ends up being a pattern that's not just a direct field access. In the past, as a library author, you sort of just had the choice of either i make this field public and then let people access it,. But if i add a field later, anyone who matches on it, that pattern is no longer going to compile because it doesn't mention this new field that i've added.