<div dir="ltr">I can sort of see what this is getting at, but I simply have no way of evaluating whether it's sensible or not without actual examples in code. This is, again, a more expansive change than discussed. I'd be interested in seeing your write-up on separating arithmetic and bitwise/bitshift operators :)</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 2, 2016 at 1:36 PM, Anton Zhilin <span dir="ltr"><<a href="mailto:antonyzhilin@gmail.com" target="_blank">antonyzhilin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">2016-08-02 21:09 GMT+03:00 Nevin Brackett-Rozinsky <span dir="ltr"><<a href="mailto:nevin.brackettrozinsky@gmail.com" target="_blank">nevin.brackettrozinsky@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>@Xiaodi</div>Actually, I think just about all the rest of the precedence rules “make sense” intuitively:<div><br></div><div>`a | b == c % d`</div><div>`a < b ? c : d * e`</div><div>`a ?? b - c`</div><div>`a...b+c`</div><div><br></div><div>These all do what they ought to, and of course assignment naturally has low precedence. Really the only confusing ones are operators that “seem like peers” but actually have different precedences. Namely the two groups I mentioned: logical operators and bitwise operators.</div><div><br></div><div>@Daniel</div><div>Making it easy to write code that is unclear to other people who read it, is an explicit anti-goal for Swift.</div></div></blockquote><div><br></div></span><div>Here's another possible plan:</div><div><a href="https://gist.github.com/Anton3/e00026409a6f948ca3ba41acf24e9672" target="_blank">https://gist.github.com/Anton3/e00026409a6f948ca3ba41acf24e9672</a><br></div><div><br></div><div>There is a base line of "core", control-like operators, which everyone must know. "Applied" operators are branched off them. For example, Ternary, Comparison or Casting can be selected as base for a new mini-tree of related operators.</div><div><br></div><div>Following this scheme, there are at least 3 "applied" domains with operators: arithmetic, bitwise and range formation. You can see result in the gist.</div></div></div></div>
</blockquote></div><br></div>