What does “compares less than 0” mean?
问题 Context While I was reading Consistent comparison, I have noticed a peculiar usage of the verb to compare : There’s a new three-way comparison operator, <=>. The expression a <=> b returns an object that compares <0 if a < b, compares >0 if a > b, and compares ==0 if a and b are equal/equivalent. Another example found on the internet (emphasis mine): It returns a value that compares less than zero on failure. Otherwise, the returned value can be used as the first argument on a later call to