An undocumented Kotlin compareTo operator?


#1

Had some code that called the compareTo method explicitly. Ran an analysis on the code and it suggested replacing the compareTo with the <=> operator. I like this and it is much nicer than the explicit call to compareTo, the issue is that it appears this operator is completely undocumented. I cannot find any reference to it in any of the Kotlin documentation.


#2

Oops, never mind. That was in groovy code, not Kotlin code.

Might make a handy addition to Kotlin however.