-
Notifications
You must be signed in to change notification settings - Fork 30
Use float for ordering, add Ordering module #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me! @cknitt ?
I already suggested using floats once, see #74, but @cristianoc was not in favor of that at the time. |
Right, I forgot about that conversation it seems... 🙈 |
Huh, I'd forgotten about that too. Seems I've changed my mind. Maybe @cristianoc has too! |
I just made an observation not a recommendation. |
Please see #150 |
Naively converting JS code to rescript may result in unexpected and hard to track down bugs because the
int
s used for ordering overflows much easier than JS numbers.This does two things:
float
s instead ofint
s for ordering to avoid premature overflows.Ordering
module to make comparison function code more readable, and more convenient to convert fromint
s.