Closed andrewchambers closed 4 years ago
See https://github.com/janet-lang/janet/issues/140. Not a bug, boot.janet is fine.
I see, haha, maybe we gotta add a note to the doc string :P I feel like I wont be the last person
@bakpakin would you consider a negative get? I also note that -0 is technically valid in floating point, though I don't know if it is usable in practice lol.
As far as breaking changes go, this one will basically break all code. Also treating -0 differently from 0 is just terrible design. They have the same hash and should be equal.
As for negative get, I think that's probably an ok addition (not for in). It would defeat some bounds checking for in
, but for get
it's probably useful.
In python:
In janet:
Note if you grep boot.janet for slice, you will see a few instances of -1 used which seem likely bugs.