<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 3, 2016, at 9:41 AM, Nevin Brackett-Rozinsky via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">I am still curious why the SE-0104 FixedWidthInteger protocol uses member functions like “.xor” rather than operators for bitwise manipulation.</div></div></blockquote><div><br class=""></div>The global operators are implemented in terms of those methods in the protocol.</div><div><br class=""></div><div>-Chris</div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">Nevin</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, Jul 1, 2016 at 8:19 PM, Dave Abrahams via swift-evolution <span dir="ltr" class=""><<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br class="">
on Fri Jul 01 2016, Riley Testut <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class="">
<br class="">
> Hi all,<br class="">
><br class="">
> This is probably very minor, but I’m not sure the protocol name<br class="">
> “BitwiseOperations” fits the Swift API Design Guidelines. Here’s what<br class="">
> the guidelines have to say about protocol names:<br class="">
><br class="">
> Protocols that describe what something is should read as nouns (e.g. Collection).<br class="">
><br class="">
> Protocols that describe a capability should be named using the<br class="">
> suffixes able, ible, or ing (e.g. Equatable, ProgressReporting).<br class="">
><br class="">
> From these two, BitwiseOperations appears to be (attempting) to follow<br class="">
> the first rule, yet “BitwiseOperations” doesn’t really describe what<br class="">
> the type is, but rather that it can do bitwise operations. The<br class="">
> documentation itself even describes the protocol as “a type that<br class="">
> supports standard bitwise arithmetic operators."<br class="">
><br class="">
> I propose we rename it to “BitwiseOperable”, or something<br class="">
> similar. Again, a small change, but if this were to ever happen, I<br class="">
> think Swift 3 is the time.<br class="">
<br class="">
</span>BitwiseOperations should really be retired after<br class="">
<a href="https://github.com/apple/swift-evolution/blob/master/proposals/0104-improved-integers.md" rel="noreferrer" target="_blank" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0104-improved-integers.md</a><br class="">
is implemented, and its uses replaced by FixedWidthInteger.<br class="">
<span class="HOEnZb"><font color="#888888" class=""><br class="">
--<br class="">
Dave<br class="">
<br class="">
_______________________________________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
</font></span></blockquote></div><br class=""></div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>