[swift-evolution] Range and ClosedRange

David Hart david at hartbit.com
Thu Jan 12 14:11:51 CST 2017


Hello,

Since the release of Swift 3, I’ve seen quite a few people (me included) experience a lot of friction with the new types for representing ranges. I’ve seen people confused when writing an API that takes a Range as argument but then can’t pass in a ClosedRange. Sometimes this can be fixed because the API should be written against a more general protocol, but sometimes that’s not the case.

Those new types definitely seem to cause more problems than they fixed (the Int.max problem). Has the Standard Library team put any thought into this?

Regards,
David.


More information about the swift-evolution mailing list