Builtin Ord / Compare method for primitives

I would personally be against the spaceship operator - it's an operator that's pretty much specific to the sort function. Python found a user-friendly way to do custom sorting without needing to introduce a sort operator - instead of having your custom sorter return -1/0/1, you instead tell python how to map an array value to a sortable key, that can be used to order the parameters. This is how it would look like in javascript:

[{ thing: 'def' }, { thing: 'abc' }].sortBy(obj => obj.thing)

This will handle all but a few obscure use cases of the spaceship operator. Some popular libraries like lodash also provide helper methods such as this.

Also, if I were actually creating a data structure such as a priority queue (or any of the other data structures you mentioned), I would expect it to treat 0 and -0 as the same value (not ordering 0 above -0), and I would expect NaN to be just as invalid of a priority as a string (not giving it the highest priority).