Skip to content
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

Question: Patterns Matching seems misleading to me #6

Open
zsluedem opened this issue Apr 21, 2022 · 3 comments
Open

Question: Patterns Matching seems misleading to me #6

zsluedem opened this issue Apr 21, 2022 · 3 comments

Comments

@zsluedem
Copy link

image

just personal opinion. The Patterns matching seems misleading to me.

@fabcotech
Copy link
Owner

I agree, do you have an idea how else to present or explain it ?

@fabcotech
Copy link
Owner

fabcotech commented Apr 21, 2022

Maybe something like that:

You can listen/peek a channel and at the same time pattern match only a given process structure

 for (@"hello" <- ch1; @("hello", "world!") <- ch2; @("hello", _) <- ch3) { ... }

You can also match processes directly

match P {
 "hello" => { ... }
 "world" => { ... }
 _ => { ... }
}```

@zsluedem
Copy link
Author

Maybe something like that:

You can listen/peek a channel and at the same time pattern match only a given process structure

 for (@"hello" <- ch1; @("hello", "world!") <- ch2; @("hello", _) <- ch3) { ... }

You can also match processes directly

match P {
 "hello" => { ... }
 "world" => { ... }
 _ => { ... }
}```

This looks better to me.

I think the misleading point in the image is that
"Tries to match Process against each Pattern_t until it finds a match"
This sentence would give people wrong impression that the join consume would just iterate the channel with different pattern which is totally not the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants