-
Notifications
You must be signed in to change notification settings - Fork 430
Open
Labels
Parserparsing reason code into an ASTparsing reason code into an ASTRFCFor larger proposals/ideas that will need discussionFor larger proposals/ideas that will need discussion
Description
In swift, there's this nice construct for simple destructuring
if case .someEnumVariant(let value) {
...
} else {
...
}
It's basically a one-armed match.
It would be super handy to have that for reason, and I imagine it would look like
if let [%pattern] = [%value] {
// x
} else {
// y
}
which we'd translate to
switch [%value] {
| [%pattern] => // x
| _ => // y
}
brentvatne, AndrewKvalheim, timjs, strega-nil, rafayepes and 1 more
Metadata
Metadata
Assignees
Labels
Parserparsing reason code into an ASTparsing reason code into an ASTRFCFor larger proposals/ideas that will need discussionFor larger proposals/ideas that will need discussion