<div dir="ltr">What would be the replacement for "not identical" then?<div><=> ?</div><div><br></div><div><> is a bit weird and could potentially conflict/be confused with generics.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 15, 2015 at 5:09 PM, Bee <span dir="ltr"><<a href="mailto:bee.ography@gmail.com" target="_blank">bee.ography@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm a fan of wordy over cryptic operators. It's easier to the eyes. However, the design of Swift seems to be unable to accept word as operator. So, we have to accept cryptic operators.<div><br></div><div>I'm agree that as ! is used in optionals, it wouldn't fit to be used as "not" anymore.</div><div><br></div><div>So, I vote for <> for "not equal". :)<br><div><br></div><div>Regards,</div><div><br></div><div>-Bee</div><div><div class="h5"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 15, 2015 at 10:57 PM, Marc Knaup 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"><div dir="ltr">Good point!<div>The negating equality and identity operators != and !== both wouldn't fit anymore. </div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 15, 2015 at 4:19 PM, Andrew Brown <span dir="ltr"><<a href="mailto:a.br@me.com" target="_blank">a.br@me.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>I'm interested to hear what the opinions are for this.</div><div>When I first read the idea I was a definite NO! (See what I did there :) )</div><div>But after thinking about it I'm interested to hear how people feel about this.</div><div>The obvious issue is what do we do with '!=' ?</div><div>Most languages which do not use ! for negation use '<>' for '!=' and I'm no sure how popular that would be.</div><div><br></div><div>ABR.</div><div><div><div><br>On 15 Dec 2015, at 15:01, Marc Knaup via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">I'm uncertain but it's definitely worth considering.<div><br><div>I also think that it's weird at the moment since in most cases the exclamation mark is now something dangerous.</div></div><div>I also had a couple of bugs in my code because the operator is too easy to miss and the negation was not or no longer intended.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 15, 2015 at 3:11 PM, Bruno Berisso 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"><div dir="ltr">Hello,<div><br></div><div>I'm really used to negate logical expressions with this operator but it never feels confortable to me. If I need to negate some complex expression sometimes I prefer to write a temporal variable and then negate that with <b>!</b> because I fear than others, or myself, could overlook it and cause confusion.</div><div><br></div><div>Now that Swift use the same operator to force the unwrap of optional values it becomes even worse.</div><div><br></div><div>Consider this examples:</div><div><br></div><div>if someOptionalValue != nil {</div><div> ...</div><div> if !(otherBoolValue && someOptionalValue! > 0) {</div><div> ...</div><div> }</div><div>}</div><div><br></div><div>Or even worse, what happen when negating Optional<Bool> values?</div><div><br></div><div>//Best case</div><div>if let value = optionalBool where !value {</div><div> ...</div><div>}</div><div><br></div><div>//Worse case</div><div>if !optionalBool! {</div><div> ...</div><div>}</div><div><br></div><div>Now what happen with this examples if we instead use a <b>not</b> operator:</div><div><br></div><div><div>if someOptionalValue != nil {</div><div> ...</div><div> if not (otherBoolValue && someOptionalValue! > 0) {</div><div> ...</div><div> }</div><div>}</div><div><br></div><div>if let value = optionalBool where not value {</div><div> ...</div><div>}</div><div><br></div><div>if not optionalBool! {</div><div> ...</div><div>}</div></div><div><br></div><div>I'm not sure if <b>not</b> is the right path here but I really want to improve the <b>!</b> to something more clear at a glance and that doesn't have different behaviour depending where it appears in an expression.</div><div><br></div><div>Thanks,</div></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=6ZGE61OxINd5lLe2xYh9Ku-2BXbixWNr2nvfzp2IB1sZiUK6bWllvEAW1nr0HIeUahbgxRTKL9Y15l4Vtk8B72J-2BZQXJRCmf-2B4azoEnD6bnKV5S7-2Bku6A5xCXRoBAJeopBSkIQTbcN8g2-2BePsmHiVp3qgaUWk2nUP-2Fwoi93r6jvWfWg3Kj7XQklxjLvSGlfXuW96qy459-2BFNfdsiHQ4a0wF02qeVSIfpWOCKLxzuwTvTk-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>_______________________________________________<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>
<br></blockquote></div><br></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=XyCJWhfMItFjSNmahITOcyxV9JT9ZIrLvQ-2Bkm7FUBXvFmBnTyNwTNN2BKFpIKpSFWQ0koKWoAkPs-2BPWp2sYrmA5wrgXZl8xrd9Jj5MH9r2Mjksd0g3abkno3MURRDBfdiYn9zoepXBNxB41kV-2FZ89-2B-2Fnyd97V56d9g1L0Pyts3XDSzYAOOgXuxwUpnvEhebvleLc6c-2ByP6rEf1Eg5QRY6A-3D-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">
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></div></div></div></blockquote></div><br></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=kPpE8prjils5Te4T0SIbdBbrHkMvwDTrNPlEKlqAfI7tnmP2u-2BDlLCwqZFEC5lC4Teib-2FYgyvxN3KkKkq-2F3bnePbuV8jXMYCQHmIyBolZiz-2BFquYuRs6V3QzS615gQFE7LJiKESxEMAfd3aHH2PiXdDPF6-2BcgnYG8LuT0Tnz-2BWn1Z394Np2gWxeffITWWEGlt-2B02GKit8usWfFtTFyAtUx6UvI1P-2FgtFn-2BSON4SGLpA-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">
</div></div><br>_______________________________________________<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>
<br></blockquote></div><div><div dir="ltr"><div><br></div></div></div>
</div></div></div></div></div></div>
</blockquote></div><br></div>