<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 Feb 14, 2016, at 10:25 AM, Xiaodi Wu <<a href="mailto:xiaodi.wu@gmail.com" class="">xiaodi.wu@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">Some further study has been helpful. Am I close to the mark in answering my own question?<br class=""><br class="">- Further reading shows that Swift'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 class=""><br class="">- It is quite evident why << is considered exponentiative.<br class=""><br class="">- Dennis Ritchie has explained <<a href="http://www.lysator.liu.se/c/dmr-on-or.html" class="">http://www.lysator.liu.se/c/dmr-on-or.html</a>> why & 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 class=""><br class="">- & is considered multiplicative because for two bits A and B, A & B == A * B.<br class=""><br class="">- ^ and | should have equal precedence to - and +, respectively, by analogous reasoning.<br class=""><br class="">- It also happens to be rational for & to have higher precedence than | by analogy with && and ||.<br class=""></div></blockquote><div><br class=""></div><div>Yep, this is all right.</div><br class=""><blockquote type="cite" class=""><div class="">It'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 & true == true * true.<br class=""></div></blockquote></div><br class=""><div class="">I’m not sure what you mean here. You want multiplication defined on booleans?</div><div class=""><br class=""></div><div class="">-Chris</div></body></html>