Hello,
I'm currently implementing the Iterator.range proposal in SpiderMonkey at Mozilla. While working on the NUMBER-RANGE implementation and extending it to support BIGINT, I encountered ambiguity in the specification when handling +∞, -∞, and NaN. The following points require clarification.
As the proposal stands, there's validation issues when handling +∞, -∞ and Nan specifically in steps:
Step 5. If start is +∞𝔽 or -∞𝔽, throw a RangeError exception. - I need to specify that typeof start is a number, otherwise throws an error that start should be finite.
Step 13. If step is NaN, throw a RangeError exception. - I need to check that step isNumberRange otherwise it throws: The 'step' argument must be a finite number.
Step 16. If step is +∞𝔽 or -∞𝔽, throw a RangeError exception. - Also needed to specify that type of step isNumberRange