Unintuitive ordering of signed integers in keys #63
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
Milestone
Right now,
Key
is implemented for signed integer types using a straight forward BE encoding. However, this leads to the following iteration order:So the negative numbers sorted after the positive ones.
In cw-storage-plus this is avaided by a custom binary encoding for signed integers (some smart trick I never looked into in detail).
I think we should address this somehow to avoid unexpected iteration order. Either by implementing what we do in cw-storage-plus, remove support for signed integers or something better.
The text was updated successfully, but these errors were encountered: