Thanks to everyone who has posted their thoughts on Ranges.

Here are the conclusions I have drawn:

Ranges are for checking whether something is within a given interval.
RangeIterators are for iterating over elements in a Range with a given step size using :by.

We discussed using "Series" or "Sequence" in place of RangeIterator, but Series seems too general and Sequence has already been taken.

Up to this point, there are no changes to the spec afaik.


Proposed changes:

It shouldn't be possible to construct RangeIterators over Str (apart from single length strings) or Complex using the Range operator (..).


Next open question:

What about Ranges using different types in each endpoint?

1.5 .. 10 :by(0.5)
(Rat .. Int)

"0" .. 7

Should they be coerced - and in that case to what? If we don't coerce them, what should be returned?

Regards,

Michael Zedeler.

Reply via email to