To range on Infinity for BigInt
Jack-Works opened this issue · comments
Related: #7 (comment)
We can range 1 to Infinity now, but we can't range from 1n to Infinity. Because Infinity is not a BigInt.
But there is no representation of Infinity for BigInt. Should we add a speical case for that?
BigInt will not be able to represent Infinity.
Should we add a special case for range?
I would vote for yes.
Though Infinity
is not a BigInt, bigint < Infinity
works and always return true
.
I also vote for yes. We intentionally made it fine to compare BigInts and Numbers.
Yes, this should definitely work.
please checkout #23
I couldn't find an issue that mentioned this. I was (now I'm not) getting worried that we'll never be able to have an "endless" BigInt
iterator just because types don't match. BigInt
s are better suited for infinite sequences than Number
s
#23 allows
BigInt.range(Infinity)
I know, I just wanted to post my thoughts about this (even though the issue is old, and has been closed by that PR).
I sometimes like to visit old posts on forums, GH issues, and social media, specially if I want to say something that hasn't been said by someone else