Skip to content

chained comparison #3694

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

Closed
kaorlol opened this issue Sep 14, 2024 · 1 comment
Closed

chained comparison #3694

kaorlol opened this issue Sep 14, 2024 · 1 comment

Comments

@kaorlol
Copy link

kaorlol commented Sep 14, 2024

Would it be a good idea to add chained comparison to rust?

I feel like it would be a good idea to have the ability to do 1 <= num <= 512 instead of having to 1 <= num || num <= 512.

I think having the num || num is more verbose and could be done with chained comparison which is a lot simpler and in my opinion easier to read.

@kaorlol kaorlol changed the title range comparison chained comparison Sep 14, 2024
@kaorlol
Copy link
Author

kaorlol commented Sep 14, 2024

#2083 never mind found this, i like how github search just didnt show this.

@kaorlol kaorlol closed this as completed Sep 14, 2024
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

1 participant