-
Notifications
You must be signed in to change notification settings - Fork 29
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
Internal DSL for Predicates? #19
Comments
Yeah unfortunately
|
Not seeing a good way to provide a single implementation of I assume a |
I was going to open an issue about |
It would be easy to do this with a proc macro. You could write something like this: pred!{predicate::gt(5) && predicate::lt(10)} However, it would require the |
When I clicked on this issue I thought this was about having a parser for a DSL that can be parsed into a Or does such a thing already exist somewhere and I just missed it? |
I've clarified the title to be about an internal dsl. I am not aware of an external dsl. |
chore(ci): Ensure CI job always runs
iirc Rust's logical operators force a return type, preventing using them in a DSL (
pred && pred
).What about the bitwise operators (
pred & pred
)? Should this be done to make the API "more ergonomic"?What about not-ing? And if our choice in operator for not-ing is at a weird precedence level compare to the others, which should we prefer?
The text was updated successfully, but these errors were encountered: