<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>On Fri, Dec 4, 2015, at 09:30 AM, Amir Michail wrote:<br></div>
<blockquote type="cite"><div><blockquote type="cite"><div>On Dec 4, 2015, at 12:27 PM, Adrian Kashivskyy <<a href="mailto:adrian.kashivskyy@me.com">adrian.kashivskyy@me.com</a>> wrote:<br></div>
<div><div style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;orphans:auto;text-align:start;text-indent:0px;text-transform:none;white-space:normal;widows:auto;word-spacing:0px;-webkit-text-stroke-width:0px;"><div>I believe nil being less than anything else is an expected behavior which has been introduced by design.<br></div>
<div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:auto;text-align:start;text-indent:0px;text-transform:none;white-space:normal;widows:auto;word-spacing:0px;-webkit-text-stroke-width:0px;"> </div>
</div>
</div>
</div>
</blockquote><div> </div>
<div>It still leads to bugs that are hard to find though.<br></div>
<div> </div>
<div>In any case, I proposed using this code for such a comparison: let f = x? < 5<br></div>
</div>
</blockquote><div> </div>
<div>There's lots and lots of ways to write bugs in Swift. That's part and parcel with being a programming language. I disagree that this is a bug that's hard to find. Do you commonly write code where you don't understand the types you're working with? If you don't know the types you're working with, this isn't the only way to accidentally write a bug that still compiles. Personally, I find the ability to compare optionals to be very valuable, almost as valuable as the ability to use == with optionals (which I doubt anyone will argue is a misfeature). And I don't think I've ever accidentally compared an optional with < without realizing it. I know, everybody is different, but deliberate uglification of the language to solve a subjective issue encountered by some people at the expense of readable code by everyone else does not seem to me to be a reasonable tradeoff. Especially since the proposed syntax here is extremely confusing; the postfix-? already means something else (in fact, it means 3 different things depending on context).<br></div>
<div> </div>
<div>-Kevin Ballard</div>
</body>
</html>