Closed kaorlol closed 2 months ago
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.
1 <= num <= 512
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.
num || num
https://github.com/rust-lang/rfcs/issues/2083 never mind found this, i like how github search just didnt show this.
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 to1 <= 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.