[swift-evolution] Representation of natural numbers with a distinct type

David Turnbull dturnbull at gmail.com
Wed Feb 3 19:12:59 CST 2016

On Wed, Feb 3, 2016 at 4:35 PM, Dave Abrahams via swift-evolution <
swift-evolution at swift.org> wrote:

> I think the semantic requirements on CollectionType's count prevent it
> from ever being negative.  If they don't, they should.

Only when you actually try to iterate will it fail. It's useful to have
this invalid state where start>end. You might have one thread finding
minima and another finding maxima. That's how it is today anyways. Which I
think is nice.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160203/e0a2e1ab/attachment.html>

More information about the swift-evolution mailing list