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

RFC 1020: Multi choice control flow #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

RFC 1020: Multi choice control flow #74

wants to merge 1 commit into from

Conversation

aljazerzen
Copy link
Contributor

One might say that this is not big enough change for a RFC, but hey let me have my fun.

I intentionally didn't push match in RFC title, because this is subject of the discussion.

@tailhook
Copy link
Contributor

tailhook commented Jan 4, 2023

My major concern would be using == operator rather than full-blown pattern matching:

  1. We mentioned somewhere that we probably want to implement algebraic types somehow at some point
  2. Even without that it would be nice to match by string prefix, array patterns, and numeric ranges (Rust can do all these things, for example)

@aljazerzen
Copy link
Contributor Author

rather than full-blown pattern matching

Yes, agree. The RFC does not even solve what the issue that requested it. My intention was to make something quick and extend it later.

Problem with that is that we should at least decide on syntax for pattern matching, otherwise we will probably run into backward incompatibility when adding it later.

Compiler team agrees that this RFC can wait and be extended to do pattern matching when algebraic types are a thing.

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

Successfully merging this pull request may close these issues.

2 participants