[swift-evolution] Let range operators always return empty ranges if the upper bound is smaller than the lower bound.

Jordan Rose jordan_rose at apple.com
Wed Jan 20 13:42:41 CST 2016


I'm a minor -1; it feels like this is in the same family as nil-messaging in that it can silently treat invalid input as a no-op. I'm not convinced that "upper bound less than the lower bound" is a strong enough signal for "empty" rather than "logic error". But it seems I'm in the minority.

Jordan


> On Jan 19, 2016, at 12:46, Uwe Falck via swift-evolution <swift-evolution at swift.org> wrote:
> 
> I’m looking for feedback on this request if its worth to start an evolution proposal.
> 
> 
> Let range operators always return empty ranges if the upper bound is smaller than the lower bound.



More information about the swift-evolution mailing list