Builtin Ord / Compare method for primitives

@ljharb @theScottyJam
Although it’s more than a year ago, I would like to point out that a language-independent string comparison method that compares code point instead of code unit would be very useful – unlike code unit ((a, b) => (a > b) - (a < b)), this is not a thing that can be done effortlessly:

/**
 * Compare two strings by (full) Unicode code point order.
 * @param {string} x
 * @param {string} y
 * @returns {number}
 */
function compareFullUnicode(x, y) {
  const ix = x[Symbol.iterator]();
  const iy = y[Symbol.iterator]();
  for (;;) {
    const nx = ix.next();
    const ny = iy.next();
    if (nx.done && ny.done) {
      return 0;
    }
    const cx = nx.done ? -1 : nx.value.codePointAt(0);
    const cy = ny.done ? -1 : ny.value.codePointAt(0);
    const diff = cx - cy;
    if (diff) {
      return diff;
    }
  }
}

(from https://github.com/nk2028/rime-dict-builder/blob/035fb661711545f97b4f8745c171b4e33fc4611f/build.js#L15-L37)

Why it’s useful?