Sign, perhaps, can be thought of as &quot;part of a number,&quot; but signum refers to the signum function (<a href="http://en.wikipedia.org/wiki/Sign_function">http://en.wikipedia.org/wiki/Sign_function</a>) defined as:<br><br>-1 if x &lt; 0<br>0 if x = 0<br>1 if x &gt; 0<br><br>1 isn&#39;t really &quot;part of&quot; 42, for instance, at least not in the sense that 42 and + are &quot;part of&quot; 42.<br><div class="gmail_quote"><div dir="ltr">On Tue, Feb 21, 2017 at 22:18 Howard Lovatt 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 dir="ltr" class="gmail_msg">You raised two points:<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">  1. &quot;... magnitude is something the number ‘has’ whereas signum is a completely new thing ...&quot; I think sign is as much part of a number as magnitude. Its a minor point, code complete gets it anyway.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">  2. &quot;... [extras] are defined as protocol extensions, therefore they should be discoverable through completion ...&quot; I wasn&#39;t thinking so much about code completion, more browsing the protocol to see what is available (I use SwiftDoc quite a bit).</div><div class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Thanks for running with this - very valuable,<br class="gmail_msg"><div class="gmail_extra gmail_msg"><br clear="all" class="gmail_msg"><div class="gmail_msg"><div class="m_-2981383357698235064gmail_signature gmail_msg">  -- Howard.<br class="gmail_msg"></div></div></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_extra gmail_msg">
<br class="gmail_msg"><div class="gmail_quote gmail_msg">On 22 February 2017 at 10:27, Max Moiseev <span dir="ltr" class="gmail_msg">&lt;<a href="mailto:moiseev@apple.com" class="gmail_msg" target="_blank">moiseev@apple.com</a>&gt;</span> wrote:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class="gmail_msg"><br class="gmail_msg"><div class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg">On Feb 21, 2017, at 3:05 PM, Howard Lovatt 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_-2981383357698235064gmail-m_-1122608621786085499Apple-interchange-newline gmail_msg"><div class="gmail_msg"><div class="gmail_msg">The re-review of SE-0104 &quot;Protocol-oriented integers&quot; begins now and runs through February 25, 2017. This proposal was accepted for Swift 3, but was not implemented in time for the release. The revised proposal is available here:<br class="gmail_msg"><div class="gmail_quote gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><br class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><span class="m_-2981383357698235064gmail-m_-1122608621786085499m_-2917819102280157209Apple-tab-span m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg" style="white-space:pre-wrap">        </span><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0104-improved-integers.md" class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg" target="_blank">https://github.com/apple/swift-evolution/blob/master/proposals/0104-improved-integers.md</a><br class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><br class="gmail_msg"><div class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><br class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><div class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><span class="m_-2981383357698235064gmail-m_-1122608621786085499m_-2917819102280157209Apple-tab-span m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg" style="white-space:pre-wrap">        </span>• What is your evaluation of the proposal?</div></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Well worth while. Few nit picks:</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><div class="gmail_msg">  1. Number.init? Description should say BinaryInteger not floating-point.</div></div></div></div></div></blockquote>I’ll update the proposal.</div><div class="gmail_msg"><br class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg"><div class="gmail_msg">  2. Number should document that mutating versions of operators can overflow.</div><div class="gmail_msg">  3. SignedNumber should document that negate and unary `-` can overflow.</div></div></div></div></div></blockquote>Documentation changes noted. Thanks!</div><div class="gmail_msg"><br class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg"><div class="gmail_msg">  4. SignedNumber, it is weird that `signum` is a function when other similar things, e.g. `magnitude`, are properties.</div></div></div></div></div></blockquote>I think of it as: magnitude is something the number ‘has’ whereas signum is a completely new thing of the same type.</div><div class="gmail_msg"><br class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg"><div class="gmail_msg">  5. Not worth representing `DoubleWidth` as an enumeration, it is obscure and therefore will only confuse people.</div><div class="gmail_msg">  6. It would be better to put the &#39;extra&#39; operations into the protocols and provide default implementations, otherwise they are difficult to find. </div></div></div></div></div></blockquote>They are defined as protocol extensions, therefore they should be discoverable through completion and in the generated source code. Or what do you mean by ‘difficult to find’?</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Thanks for the feedback!</div><div class="gmail_msg"><br class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_quote gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><div class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><div class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><br class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"></div><div class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><span class="m_-2981383357698235064gmail-m_-1122608621786085499m_-2917819102280157209Apple-tab-span m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg" style="white-space:pre-wrap">        </span>• Is the problem being addressed significant enough to warrant a change to Swift?</div></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Yes, the current design has not served my purpose on more than one occasion </div><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><div class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><div class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><br class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"></div><div class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><span class="m_-2981383357698235064gmail-m_-1122608621786085499m_-2917819102280157209Apple-tab-span m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg" style="white-space:pre-wrap">        </span>• Does this proposal fit well with the feel and direction of Swift?</div></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Yes</div><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><div class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><div class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><br class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"></div><div class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><span class="m_-2981383357698235064gmail-m_-1122608621786085499m_-2917819102280157209Apple-tab-span m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg" style="white-space:pre-wrap">        </span>• If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?</div></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Yes, this proposal is similar to what other languages provide, e.g. Scala. In Scala however they tackle the `conversion problem as well in their `traits heirarchy. I guess this could be added at a later date.</div><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><div class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><div class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><br class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"></div><div class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><span class="m_-2981383357698235064gmail-m_-1122608621786085499m_-2917819102280157209Apple-tab-span m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg" style="white-space:pre-wrap">        </span>• How much effort did you put into your review? A glance, a quick reading, or an in-depth study?</div></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><div class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><div class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"></div></div></div></blockquote><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><div class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><div class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"></div></div></div></blockquote><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><div class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"><div class="m_-2981383357698235064gmail-m_-1122608621786085499gmail_msg gmail_msg"></div></div></div></blockquote><div class="gmail_msg">Read the proposal, have used similar features in other languages, and have had trouble with Swift&#39;s current heirarchy. </div></div></div><span class="m_-2981383357698235064gmail-HOEnZb gmail_msg"><font color="#888888" class="gmail_msg"><div dir="ltr" class="gmail_msg">-- <br class="gmail_msg"></div><div class="gmail_msg">-- Howard.</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"></font></span></div></blockquote></div><br class="gmail_msg"></div></blockquote></div><br class="gmail_msg"></div></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>