<div style="white-space:pre-wrap">> For example in `if let aBool = aBool where !aBool`, let's suppose that we know that `aBool` optional it's not empty before this check. How would you write it? `!aBool!` or with the `if let...` ?<br><br>if aBool == false {} covers this nicely. <br><br>As for the whole topic of words vs cryptic symbols for Boolean operators I'm agnostic on what's best but imho we need to have consistency. E.g. either all words, or all math symbols or all the same as in C (current state of things). <br><br>You can always rewrite !x as (x==false) if x is a Bool and forced unwrapping is undesirable anyway so the confusion can be minimized in practice. <br><br>Ilya. </div><br><div class="gmail_quote"><div dir="ltr">On Tue, Dec 15, 2015 at 19:56 Bruno Berisso via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I also hit the <b>!=</b> vs <b><></b> dilema and conclude that we could continue using the <b>!=</b> as "not equal".<div><br><div>It's true that it will not be as consistent as before but I think it's a reasonable price to pay taking into account the issues with <b>!</b> as 'not'. </div></div><div class="gmail_quote"></div></div><div dir="ltr"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Not that I necessarily think this proposal is a good idea. The given examples reek of being against unwrapping for some reason.</div><div><br></div><div>Why not use `if let aBool = aBool where !aBool`? And `if let someValue = someValue where !(otherBoolValue && someValue > 0)`?</div></div></blockquote><div><br></div></div></div><div dir="ltr"><div class="gmail_quote"><div>I think the issue is the complete different meanings of a symbol depending only in where it appears in an expression. Adding that <b>!</b> character is really easy to miss in an expression make it at last uncomfortable.</div><div><br></div><div>I agree that we are all really used to find <b>!</b> in logical expressions and our brain is trained to translate it to NOT automatically but that doesn't mean that it's good idea to keep it there.</div><div><br></div><div>For example in `if let aBool = aBool where !aBool`, let's suppose that we know that `aBool` optional it's not empty before this check. How would you write it? `!aBool!` or with the `if let...` ?</div><div><br></div><div>I think that clearly <b>!</b> is not good choice for negation but my mind is so used to it that I can't totally affirm that <b>not</b> is <i>the</i> alternative to it. Do we have another alternatives?</div><div><br></div><div><br></div></div></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=1p9Jer2O6jVE9KWvo-2B9iUaEyN8slp4IizyiLwsfp54PuIzNf98bk9mcnC9MK7FuAPQNbQF3aF2V9-2FQxdv0tdx7naNusXiMhFu3qrjivt3BLVtqWXFzZ1XAWEnCs1zO1TZLDPbZdBIf9TIa0mm3jX0MaVOjmGwLH1xMACTcDCvU3FwAFA4Pjpqa-2BzuaN-2BMKzlF8DNzNAlzIO4VGhbyz0Xrs3BBz1Mbida-2F5r-2FViPBAKg-3D" alt="" width="1" height="1" border="0" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important">
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</blockquote></div>