There is no need to change it<br><br>Since the context basically disambiguates the meaning of !<br><br>The next best thing is to compare it to false<br><br>(val == false) // same as !val<br><div class="gmail_quote"><div dir="ltr">On Wed, Feb 15, 2017 at 3:02 PM David Waite via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="gmail_msg">If someone came with a nice syntax I’d be for this. I can’t imagine what that would be.<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I doubt there is an alternate prefix or postfix operator that would pass muster, due to ‘!’ already meaning the appropriate thing in so many languages, and swift only supporting symbolic operators.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I can’t think of a method on boolean which would read properly either, e.g.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><span class="m_-8132155900057031411Apple-tab-span gmail_msg" style="white-space:pre-wrap">        </span>if isValid.not() {…}</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">The closest I could think to a decent bike shed color would be a global function:</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><span class="m_-8132155900057031411Apple-tab-span gmail_msg" style="white-space:pre-wrap">        </span>if not(isValid) {…}</div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">-DW</div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"><div class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg">On Feb 15, 2017, at 11:10 AM, Robert Widmann via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br class="m_-8132155900057031411Apple-interchange-newline gmail_msg"><div class="gmail_msg"><div dir="auto" class="gmail_msg"><div class="gmail_msg">So you&#39;ve identified the problem, but what do you propose as a solution here?  </div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">It should be noted that a (non-stdlib) language-level answer to this question has already been discussed and rejected (<a href="https://lists.swift.org/pipermail/swift-evolution/2015-December/000032.html" class="gmail_msg" target="_blank">https://lists.swift.org/pipermail/swift-evolution/2015-December/000032.html</a>).</div><div class="gmail_msg"><br class="gmail_msg"><div class="gmail_msg">~Robert Widmann</div></div><div class="gmail_msg"><br class="gmail_msg">2017/02/15 9:02、Sadiq via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>&gt; のメッセージ:<br class="gmail_msg"><br class="gmail_msg"></div><blockquote type="cite" class="gmail_msg"><div class="gmail_msg"><div dir="ltr" class="gmail_msg">Hello,<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I would like to suggest to change Logical NOT Operator from ! to something else. </div><div class="gmail_msg">It will increase the readability of the code and will avoid any confusion with the symbol used for force unwrapping of optional values. </div><div class="gmail_msg">It would be easier for new programmers to learn Swift as the first language. </div><div class="gmail_msg">I don&#39;t understand the rational behind using the same operator for two different purposes. </div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Thanks and Regards,</div><div class="gmail_msg">Mohammad Sadiq</div></div>
</div></blockquote><blockquote type="cite" class="gmail_msg"><div class="gmail_msg"><span class="gmail_msg">_______________________________________________</span><br class="gmail_msg"><span class="gmail_msg">swift-evolution mailing list</span><br class="gmail_msg"><span class="gmail_msg"><a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a></span><br class="gmail_msg"><span class="gmail_msg"><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="gmail_msg" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br class="gmail_msg"></div></blockquote></div>_______________________________________________<br class="gmail_msg">swift-evolution mailing list<br class="gmail_msg"><a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a><br class="gmail_msg"><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="gmail_msg" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="gmail_msg"></div></blockquote></div><br class="gmail_msg"></div></div></div>_______________________________________________<br class="gmail_msg">
swift-evolution mailing list<br class="gmail_msg">
<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a><br class="gmail_msg">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="gmail_msg">
</blockquote></div>