<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div></div><div>It just occurred to me that there is one problem with replacing "!" with "not":</div><div>"not" would be the first operator being a word, which would lead down a slippery slope that I'd rather not tread: would we allow user defined unary operators being words?</div><div>I'd rather not as this makes expressions unreadable IMHO. That is a problem I have with Scala: there they often use words as operators which I find difficult to read.</div><div>Haskell does not have this problem as "not" is just a unary function there.</div><div><br></div><div>So, I'd like to keep the ! even though I'm no friend of it.</div><div><br></div><div>-Thorsten </div><div><br>Am 15.12.2015 um 19:39 schrieb Al Skipp via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>>:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div><blockquote type="cite" class=""><div class=""><div class="" 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;">I cannot think of a language where I don’t have ! as negate (which I read as not).</div></div></blockquote><br class=""></div><div>There’s Haskell, a language well endowed with cryptic operators, but not prefix <b class="">!</b>, it uses a ‘not’ function instead.</div><div><br class=""></div><div>You could do the same in Swift, should you wish:</div><div class=""><br class=""></div><div class="">func not(bool: Bool) -> Bool { return !bool }</div><div class=""><br class=""></div><div class="">And because in Swift, ‘if’ doesn’t require braces around the predicate, it doesn’t look too bad.</div><div class="">if not(x) { …</div><div class=""><br class=""></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=1MXK54sosN3xru3iYcLt0oBZ2w20i49gyogXctgrspdMHH59M3ofs6LEolz4fVgdGlUpZ7Fs-2BHVrNQRhncYULN9HRrdHkgT-2FzZxPxmS8lbiFM8NCt9QkI9QnkmLSZRrWmwPy7Mr1uLAb3ZjQPQBj-2FFFTrT5-2B-2FRNC72K-2FfhIUazw52p9HWB7H6qPj6bVMS7uyhwnUptazr5QQXiUHvVkF9tzz-2F0RjdfYg2st9M87wzjY-3D" alt="" width="1" height="1" border="0" style="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;">
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></body></html>