-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pattern matching #747
Comments
GuardUPDATE: Everything is much simpler:
This example shows
We don't need anything to support this, besides "normal" form of the non-guard match/switch
Guard won't have incoming Match
Switch
Should this be
|
Handling
|
Multiple values?ProblemHow do we support case when several patterns lead to same branch? Example (v-lang): enum Color {
red
blue
green
}
fn is_red_or_blue(c Color) bool {
return match c {
.red, .blue { true } // comma can be used to test multiple values
.green { false }
}
} ProposalJust reuse existing syntax for multiple senders
If match is set of connections, semantically, then constraints will - multiple senders are allowed on the left, but multiple receivers are not allowed on the right |
Related to #802 |
This issue is to broad and should be decomposed into several smaller onces
|
In this issue we discuss how #726 and #725 might handle incoming data comparing to some patterns, regardless what's the outcome of the executed branch (selecting or routing)
(Besides equality check)
The text was updated successfully, but these errors were encountered: