<div dir="ltr">More brainstorming:<div><br></div><div>UInt8(bitsOf: someInt8)<div>UInt8(byTruncating: someBiggerInt)</div><div class="gmail_extra">
<br><div class="gmail_quote">On Tue, Feb 16, 2016 at 1:37 PM, David Turnbull via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</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 propose upgrading bit-casting labels to match the new API design guidelines. Here&#39;s what we have today:<div><br></div><div><div>UInt8(bitPattern: someInt8)</div><div>Uint8(truncatingBitPattern: someBiggerInt)</div></div><div><br></div><div><div>&quot;Bit pattern&quot; has the needless word &quot;pattern&quot; while not reading well due to the lack of a verb or preposition. Simply &quot;bits&quot; will not be confused with something else in this context. &quot;Truncating&quot; is the present participle which is confusing.</div><div><br></div></div><div>I like:</div><div>UInt8(fromBits: someInt8)</div><div>Uint8(truncateBits: someBiggerInt)</div><div><br></div><div>-david<br></div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 16, 2016 at 11:29 AM, Dave Abrahams via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span><br>
on Tue Feb 16 2016, David Turnbull &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br>&gt;<br>
&gt; My last week was spent reading files with huffman coding. So I had no<br>
&gt; choice but to use bitwise operations. My experience is that Swift got this<br>
&gt; right (except for &quot;truncatingBitPattern&quot; taking up 25% of an 80 column<br>
&gt; line).<br>
<br>
</span>Suggestions for improved names welcomed.<br></blockquote></div></div></div></div>
<br>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">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></div></div>