[swift-evolution] Strings in Swift 4
brent at architechies.com
Thu Feb 2 06:07:05 CST 2017
> On Feb 2, 2017, at 3:06 AM, Jaden Geller via swift-evolution <swift-evolution at swift.org> wrote:
> It's not infinite (else subscript would trap)
I'm not necessarily a fan of the idea of allowing you to iterate over an `IncompleteRange`, but I have to ask: What do you imagine an infinite sequence of integers would do when it tried to go past the `max` value? As far as I can tell, trapping is the *only* sensible possibility.
(If you used a `BigInt` type, the sequence could of course then be infinite, or as infinite as memory allows.)
More information about the swift-evolution