<div dir="ltr">Fun as this conversation is, replacing "!" with "not" and other related changes ("&&" replaced with "and", etc.) represent a <a href="https://github.com/apple/swift-evolution/blob/master/commonly_proposed.md">commonly proposed and rejected change</a>, and the rationale is given <a href="https://lists.swift.org/pipermail/swift-evolution/2015-December/000032.html">here</a>.<div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 22, 2016 at 1:15 PM, Dave Abrahams via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
on Sat May 21 2016, Антон Миронов <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br>
<br>
> I found negation operator (!) the least detectable among the code. So<br>
> I’ve decided to add property “not” to BooleanType (Swift 2.2) or<br>
> Boolean on 3.0 with extension:<br>
><br>
> extension BooleanType {<br>
> var not: Bool { return !self.boolValue }<br>
> }<br>
><br>
> This is code with negation operator:<br>
> return !self.lanes[position.y][currentLaneRange].contains(.Gap)<br>
><br>
> As I sad before negation operation is hard to spot. Moreover at first<br>
> it looks like I’m trying to negate self for some reason.<br>
><br>
> This is code with “not” property:<br>
> return self.lanes[position.y][currentLaneRange].contains(.Gap).not<br>
<br>
</span>I think having the “not” up at the front of the boolean condition is<br>
useful. Think about why this joke works:<br>
<br>
“I'm a big fan of reference semantics... NOT!”<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
-Dave<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">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>
</div></div></blockquote></div><br></div></div>