generated from tc39/template-for-proposals
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I see two main use cases for sorting in an isolated JS environment (interop aside, #4):
- A total ordering for use in a BTree-like data structure
- A human-readable ordering
(1) is served by UTF-16 ordering. (2) is better-served by Intl.Collator.
There is no reason to use code point ordering for a JS-internal data structure. In fact, it is harmful since no sort order is likely to be faster than UTF-16 order.
The README seems to have an underlying assumption that UTF-16 order is "wrong" in some way. For example, it suggests that if we weren't beholden to the web reality, JS might consider using this behavior for the <
operator.
Metadata
Metadata
Assignees
Labels
No labels