Three-way comparison in Rust?


#1

Hello, I couldn’t find any info on this, but would it be reasonable to have three-way comparison in Rust? Or a spaceship operator <=> doesn’t go with rust philosophy?


#2

There is Ord::cmp (see https://doc.rust-lang.org/core/cmp/trait.Ord.html) on which the comparison operators are based. I don’t think an operator is necessary.