lifting matching variables from patterns in case #1370
Labels
_complexity:high
A task with a high complexity that should be hard
enhancement
New feature or request
language
needs-rfc
This change needs to follow the RFC process
_size:medium
A medium sized task that will take some time to complete
Describe the problem you are trying to solve
We often have the situation where we match and extract data in a
case
clause, this data is stored in a nested fashion which can feel cumbersome to use and is possibly unintuitive that keys assigned in a record are not accessible as varaibles.Describe the solution you'd like
A match form that lifts up the matched keys into local variables inside the catch so they can be accessed directly, for example (syntax here being a quick make up):
Notes
An additional upside is that we would save the cost of creating and then deconstructing a record result making the lifted form a more performant option.
The text was updated successfully, but these errors were encountered: