<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">"prefix -=“?<div class=""><br class=""></div><div class="">(I’m not sure if I’m serious)</div><div class=""><br class=""></div><div class="">- Dave Sweeris</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 18, 2016, at 5:57 PM, Howard Lovatt <<a href="mailto:howard.lovatt@gmail.com" class="">howard.lovatt@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">I think `prefix -` works for `negated` (non-mutating form) but not `negate` (mutating form). IE `-=` is the mutating form of `infix -` and there is no equivalent in C-like languages for `negated` :(</div><div class="gmail_extra"><br clear="all" class=""><div class=""><div class="gmail_signature"> -- Howard.<br class=""></div></div>
<br class=""><div class="gmail_quote">On 19 April 2016 at 08:28, <span dir="ltr" class=""><<a href="mailto:davesweeris@mac.com" target="_blank" class="">davesweeris@mac.com</a>></span> wrote:<br class=""><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=""><div class=""><blockquote type="cite" class=""><div class="">On Apr 16, 2016, at 6:12 PM, Howard Lovatt via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>> wrote:</div><br class=""><div class="">For the Arithmetic protocol how about changing it to:<div class=""><br class=""></div><div class=""> protocol Arithmetic {</div><div class=""> func + (lhs: Self, rhs: Self) -> Self</div><div class=""><font size="2" class=""><span style="background-color:rgba(255,255,255,0)" class=""> mutating func += (rhs: Self) -> Self</span></font></div><div class=""><font size="2" class=""><span class=""> ...</span></font></div><div class=""><font size="2" class=""><span class=""> }</span></font></div><div class=""><font size="2" class=""><span class=""><br class=""></span></font></div><div class=""><font size="2" class=""><span class="">That way naming issues are largely avoided, except for `mutating func negate()` which has no operator and would therefore have to be a normal, non-operator, <span class=""></span>func. <br class=""></span></font></div></div></blockquote></div>“prefix -" works for negate, at least off the top of my head.<div class=""><br class=""></div><div class="">I think.<br class=""><div class=""><br class=""></div><div class="">- Dave Sweeris</div></div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>