I think these protocols + generics should cover most such use cases, no?<br><br><br><div class="gmail_quote"><div dir="ltr">On Sun, Jan 29, 2017 at 06:57 Jonathan Hull &lt;<a href="mailto:jhull@gbis.com">jhull@gbis.com</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">Shouldn’t “Number” be reserved for a foundation type similar to NSNumber?  Or would this protocol actually serve that purpose?<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I was planning to ask for a value type similar to NSNumber in phase 2.  I built one for my own code (a struct around an enum which can be Int, Decimal, Rational, or Rational * π) and it is super useful for handling things like user input where the value could be an Integer or Float/Decimal, and I always want the highest precision until I ask for it in a particular form.  If it came in as an integer, I know I can present it as an integer, and vice versa with decimal numbers.</div><div class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Sometimes it is nice to be able to say: “The user gave me a number” and not really care about the underlying representation...</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Thanks,</div><div class="gmail_msg">Jon</div></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"><br class="gmail_msg"></div><div class="gmail_msg"><br 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 Jan 27, 2017, at 4:50 PM, Max Moiseev 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_1382605970242773236Apple-interchange-newline gmail_msg"><div class="gmail_msg"><div style="word-wrap:break-word" class="gmail_msg">Renaming Arithmetic to Number (and having SignedNumber) might actually end up being a win, since we need to provide SignedNumber to maintain source code compatibility anyway.<div class="gmail_msg"><br class="gmail_msg"><div class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg">On Jan 27, 2017, at 8:34 AM, Xiaodi Wu 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_1382605970242773236Apple-interchange-newline gmail_msg"><div class="gmail_msg">I&#39;d always just assumed that Arithmetic was chosen so that SignedArithmetic wouldn&#39;t clash with the old SignedNumber. If that&#39;s not an issue, definitely agree that Number is the superior name.<br class="gmail_msg"><div class="gmail_quote gmail_msg"><div dir="ltr" class="gmail_msg">On Fri, Jan 27, 2017 at 08:30 T.J. Usiyan via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">Oh, I misread the arrows in that diagram and this makes much more sense now.<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Thanks.</div></div><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg">On Fri, Jan 27, 2017 at 9:14 AM, Stephen Canon <span dir="ltr" class="gmail_msg">&lt;<a href="mailto:scanon@apple.com" class="gmail_msg" target="_blank">scanon@apple.com</a>&gt;</span> wrote:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg">The bitwise stuff isn&#39;t on ArithMETic | ARITHmetic | Number | whatever.</div><div class="gmail_msg"><div class="gmail_msg m_1382605970242773236m_168233638687031761h5"><br class="gmail_msg"><div class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg">On Jan 27, 2017, at 9:13 AM, T.J. Usiyan 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_1382605970242773236m_168233638687031761m_-960103653602236972Apple-interchange-newline gmail_msg"><div class="gmail_msg"><div dir="ltr" class="gmail_msg">Regarding `Number` or `Numeric`: Does everything in Arithmetic apply to complex numbers and do we want it to? The bitwise stuff is where I think that there might be a mismatch.<div class="gmail_msg"><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg">On Thu, Jan 26, 2017 at 2:26 PM, Dave Abrahams via swift-evolution <span dir="ltr" class="gmail_msg">&lt;<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="gmail_msg"><br class="gmail_msg">
on Sun Jan 15 2017, Stephen Canon &lt;<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br class="gmail_msg">
<br class="gmail_msg">
&gt; Responding to the thread in general here, not so much any specific email:<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; “Arithmetic” at present is not a mathematically-precise concept, and<br class="gmail_msg">
&gt; it may be a mistake to make it be one[1]; it’s a<br class="gmail_msg">
&gt; mathematically-slightly-fuzzy “number” protocol.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
</span>In that case, should we consider renaming it to “Numeric” or even<br class="gmail_msg">
“Number?”  That would at least remove the question about how to<br class="gmail_msg">
pronounce it.<br class="gmail_msg">
<span class="m_1382605970242773236m_168233638687031761m_-960103653602236972HOEnZb gmail_msg"><font color="#888888" class="gmail_msg"><br class="gmail_msg">
<br class="gmail_msg">
--<br class="gmail_msg">
-Dave<br class="gmail_msg">
</font></span><div class="m_1382605970242773236m_168233638687031761m_-960103653602236972HOEnZb gmail_msg"><div class="gmail_msg m_1382605970242773236m_168233638687031761m_-960103653602236972h5"><br class="gmail_msg">
_______________________________________________<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">
</div></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" 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></blockquote></div><br class="gmail_msg"></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>
_______________________________________________<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>_______________________________________________<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></div></div></blockquote></div>