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

Add match expressions #4

Closed
3 tasks done
jmackie opened this issue Apr 4, 2022 · 0 comments · Fixed by #22
Closed
3 tasks done

Add match expressions #4

jmackie opened this issue Apr 4, 2022 · 0 comments · Fixed by #22
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@jmackie
Copy link
Member

jmackie commented Apr 4, 2022

Also known as: pattern matching, case expressions.

Initial syntax should look like:

match expr with
| Foo(x) -> do_something_with(x)
| Bar -> y
| _ -> z

So for this first pass, we're only worried about constructor patterns and wildcard patterns.

Explicitly not in scope:

  1. Literal patterns
  2. Exhaustiveness checking
  3. Arbitrarily nested OR patterns (see this rust RFC)

1 and 2 will be fast followers. 3 will come much later (if at all).

@jmackie jmackie added this to the 0.0.2 milestone Apr 4, 2022
@jmackie jmackie self-assigned this Apr 4, 2022
@jmackie jmackie added the enhancement New feature or request label Apr 4, 2022
This was referenced Apr 5, 2022
@jmackie jmackie linked a pull request Apr 6, 2022 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant