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

Allow matchGuards in expression position with ?(...) #483

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

Conversation

marzipankaiser
Copy link
Contributor

Proof-of-concept implementation of #481 with the syntax ?(x is p).

@b-studios
Copy link
Collaborator

Wouldn't it be also an alternative to support negated guards (that is not negated patterns in general, but only guards)?

@marzipankaiser
Copy link
Contributor Author

Depends on what exactly you mean by negated guards. The common usecase would be something like x is not Some("..."),
which I'd say is a negated pattern?
Guards which are not patterns (is), in my understanding, are boolean expressions and could already be negated, no?

@jiribenes jiribenes force-pushed the master branch 3 times, most recently from ee9d209 to 58c8510 Compare October 1, 2024 18:11
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