Re: [swift-dev] [swift-evolution] Possible bug with arithmetic optional comparison ?

2016-05-25 Thread Yaman JAIOUCH via swift-dev
I'd like to pitch it out to swift-evolution but I'm not sure to fully understand the proposed solution of "disabling implicit promotion from T to T?" Does it mean that the following code won't work anymore? let a: Int? = nil let b: Int = 25 a < b // does not compile anymore If so, I'm not sure it

Re: [swift-dev] [swift-evolution] Possible bug with arithmetic optional comparison ?

2016-05-24 Thread Chris Lattner via swift-dev
> On May 24, 2016, at 11:14 AM, Joe Pamer wrote: > >>> >>> On May 24, 2016, at 9:35 AM, Jordan Rose via swift-dev >> > wrote: >>> >>> I wouldn’t phrase it this way. “nil” could just as easily been above all of >>> the integers. >>> >>> We added overloads for < and

Re: [swift-dev] [swift-evolution] Possible bug with arithmetic optional comparison ?

2016-05-24 Thread Joe Pamer via swift-dev
> On May 24, 2016, at 11:03 AM, Chris Lattner wrote: > > >> On May 24, 2016, at 9:35 AM, Jordan Rose via swift-dev > > wrote: >> >> I wouldn’t phrase it this way. “nil” could just as easily been above all of >> the integers. >> >> We added overloads for < and frie

Re: [swift-dev] [swift-evolution] Possible bug with arithmetic optional comparison ?

2016-05-24 Thread Chris Lattner via swift-dev
> On May 24, 2016, at 9:35 AM, Jordan Rose via swift-dev > wrote: > > I wouldn’t phrase it this way. “nil” could just as easily been above all of > the integers. > > We added overloads for < and friends that took optionals so that you could > sort an array by passing < and get something reas

Re: [swift-dev] [swift-evolution] Possible bug with arithmetic optional comparison ?

2016-05-24 Thread Jordan Rose via swift-dev
I wouldn’t phrase it this way. “nil” could just as easily been above all of the integers. We added overloads for < and friends that took optionals so that you could sort an array by passing < and get something reasonable out without having to provide your own comparison function, but you’re not