by ruuda on 3/3/25, 7:14 AM with 8 comments
by AlotOfReading on 3/4/25, 4:12 AM
by sfink on 3/4/25, 8:16 AM
Then again... I have a little more trouble discarding floats as keys, including floats as set members.
And anyway, you can't stop floats from being weird. 0 vs -0. NaN. +/-Infinity.
by lifthrasiir on 3/4/25, 3:38 AM
by childintime on 3/4/25, 8:34 AM
A float actually sounds like the perfect way to index a list: anything in the range from from 0 to 1 (excluding either) would map to the first element. It works just like the wheel of fortune. Well almost, with the wheel exactly 0 or 1 would be invalid. So you might want to index using 0.5, 1.5, etc instead, and the implementation can round up or down the way it wants. We've solved a language incompatibility issue, lol </rant>