<div style="white-space:pre-wrap">Yes, but not enough to claim limited resources needed for pressing matters. It&#39;s not a feature anyone would clamor for, more a product of the foolish consistency hobgoblin. Rationale: it is possible in JavaScript (for instance) to evaluate true * true, but not in Swift. [I&#39;m aware that implicit casting is taking place in JavaScript, and that the return type isn&#39;t a Boolean.] It comes into play in exactly one scenario I can think of:<br><br>Student: &quot;Why is &amp; a multiplicative operation?&quot;<br>Teacher: &quot;Well, because for two bits A and B, A &amp; B == A * B.&quot;<br>Student: &quot;That&#39;s interesting, let me try it with the only type I know that represents a single bit of data.&quot;<br>[At this point the student should, IMO, be able to actually evaluate A * B where A and B are booleans.]<br><br>Analogous rationale for defining &amp;+ and &amp;- on booleans.</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Feb 15, 2016 at 12:20 PM Chris Lattner &lt;<a href="mailto:clattner@apple.com">clattner@apple.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"><div><blockquote type="cite"><div>On Feb 14, 2016, at 10:25 AM, Xiaodi Wu &lt;<a href="mailto:xiaodi.wu@gmail.com" target="_blank">xiaodi.wu@gmail.com</a>&gt; wrote:</div><br><div>Some further study has been helpful. Am I close to the mark in answering my own question?<br><br>- Further reading shows that Swift&#39;s rationalized operator precedence levels broadly align with those of Erlang and Go. (However, those languages also seem to lack documentation on how they arrived at this set of precedence levels.)<br><br>- It is quite evident why &lt;&lt; is considered exponentiative.<br><br>- Dennis Ritchie has explained &lt;<a href="http://www.lysator.liu.se/c/dmr-on-or.html" target="_blank">http://www.lysator.liu.se/c/dmr-on-or.html</a>&gt; why &amp; has lower precedence than == in C, and why in hindsight that is better off changed. This change has been implemented in Swift/Go/Erlang and also in other languages like Python.<br><br>- &amp; is considered multiplicative because for two bits A and B, A &amp; B == A * B.<br><br>- ^ and | should have equal precedence to - and +, respectively, by analogous reasoning.<br><br>- It also happens to be rational for &amp; to have higher precedence than | by analogy with &amp;&amp; and ||.<br></div></blockquote><div><br></div></div></div><div style="word-wrap:break-word"><div><div>Yep, this is all right.</div></div></div><div style="word-wrap:break-word"><div><br><blockquote type="cite"><div>It&#39;s a bit of a bummer, if this line of reasoning was indeed used in arriving at these operator precedence levels, that Swift will not allow evaluation of true * true (etc.) without casting. I would expect true &amp; true == true * true.<br></div></blockquote></div></div><div style="word-wrap:break-word"><div></div><br><div>I’m not sure what you mean here.  You want multiplication defined on booleans?</div></div><div style="word-wrap:break-word"><div><br></div><div>-Chris</div></div></blockquote></div>