Talk:Spaceship operator

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computing (Rated Redirect-class)
WikiProject icon This redirect is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Redirect page Redirect  This redirect does not require a rating on the project's quality scale.
 

Stable sort[edit]

The article previously mentioned this being compatible with a stable sort. This doesn't really need to be said and sort of confuses the issue. A reader might think that stability comes from the spaceship operator, not from it merely being possible due to the operator returning 0 for equal arguments. --- RockMFR 20:37, 5 July 2008 (UTC)

Spaceship operator really a The spaceship operator, written <=>, is a binary relational operator[edit]

Currently, this article states

  • The spaceship operator, written <=>, is a binary relational operator [...].

From a mathematical perspective, is this really true? I would say the spaceship operator is a binary function and ternary relation. Please correct me if I'm wrong.

It's definitely a binary relation since it's a relation between two things Thruston (talk) 13:16, 11 February 2014 (UTC)

Also, this article states

  • This operator is also used in ASCII-based mathematical notation to represent "less than, equal to or greater than", and is synonymous with the symbols ⋛ and ⋚.

Can someone elaborate on when this is actually used?

Thanks, --Abdull (talk) 09:26, 5 September 2010 (UTC)

Python's cmp()[edit]

This seems to be the same as Python's cmp(x,y) builtin[1]. Also, I think that the spaceship operator comes from C's qsort()/bsearch() API.203.185.226.238 (talk) 03:22, 12 March 2013 (UTC)

Merge with three way comparison?[edit]

This page should probably be reduced to a small section in Three-way comparison. Any views? Thruston (talk) 13:21, 11 February 2014 (UTC)

  • Support. In fact, I'll do it right now. The content in this article is too trivial to stand on its own, at least with the given references. QVVERTYVS (hm?) 20:03, 26 September 2014 (UTC)