IndexedDB: ordering sense of IDBFactory.cmp?

As we're implementing IDBFactory.cmp in WebKit we noticed that the
ordering sense is reversed compared to C's strcmp/memcmp, Perl's cmp/<=>
operators, etc.

As currently spec'd, IDBFactory.cmp(first, second) returns 1 if first
< second

C's memcmp/strcmp(first, second) return -1 if first < second
Perl's (first cmp second) and (first <=> second) operators return -1
if first < second
Java's first.compareTo(second) returns < 0 if first < second
.NET's String.Compare(first, second) returns < 0 if first < second

We're wondering if this will be a usability issue with the API, if there's
a good justification for this seemingly inverted ordering, and if it's not
too late to reverse this in the spec.

Received on Monday, 3 October 2011 16:30:40 UTC