<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div></div><div>Looking real good (especially the alternative section :P)!</div><div><br></div><div>What's the rationale for using upper and lower?</div><div><br></div><div>My objection to this is how it can be read: "precedence addition associativity left upper XXX lower XXX"</div><div><br></div><div>I think upper and lower kind of break the flow of how it is read.&nbsp;</div><div><br></div><div>This seems clearer (when read as you are skimming code): "precedence addition associativity left above XXX below XXX"</div><div><br></div><div>While I'm at it...might I suggest something controversial?</div><div><br></div><div>associativity -&gt; associate&nbsp;</div><div><br></div><div>Example when read: "precedence addition associate left above XXX below XXX"</div><div><br></div><div>Reads pretty nice I think.&nbsp;</div><div><br></div><div>Brandon</div><div><br>On May 21, 2016, at 8:48 AM, Антон Жилин &lt;<a href="mailto:antonyzhilin@gmail.com">antonyzhilin@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">Updated the proposal:<div><a href="https://github.com/Anton3/swift-evolution/blob/master/proposals/0077-operator-precedence.md">https://github.com/Anton3/swift-evolution/blob/master/proposals/0077-operator-precedence.md</a><br></div><div><br></div><div>I included many of alternate solutions. Please, reply, if I missed any.</div><div><br></div><div>Still I do not hurry to swap any of alternate solution with syntax used throughout the proposal, although many of them are objectively better.</div><div><br></div><div>- Anton</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-05-21 1:17 GMT+03:00 Matthew Johnson <span dir="ltr">&lt;<a href="mailto:matthew@anandabits.com" target="_blank">matthew@anandabits.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>On May 20, 2016, at 5:06 PM, Brandon Knope &lt;<a href="mailto:bknope@me.com" target="_blank">bknope@me.com</a>&gt; wrote:</div><br><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br><br>On May 20, 2016, at 5:56 PM, Антон Жилин via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br><br></div><blockquote type="cite" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div><div dir="ltr">My working version is still the one in the proposal, but I'm planning to add the alternative versions we discussed, including your and Brent's variants.<div><br><div>IMHO, original version is heavy, but clear (not to confuse with "clean"). Your lighter version looks more clean, but somewhat less consistent and more free in terms of grammar.</div><div><br></div><div>Also, I've got another version, which is considerably ligher than current one, while being as structured:</div><div><br></div><div>precedence Multiplicative {</div><div>&nbsp; &nbsp; associativity(left)</div><div>&nbsp; &nbsp; above(Additive)</div><div>&nbsp; &nbsp; below(Exponentiative)</div><div>}</div></div></div></div></blockquote><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Why not:</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">precedence Multiplicative {</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">&nbsp; &nbsp; associativity left</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">&nbsp; &nbsp; above Additive</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">&nbsp; &nbsp; below Epxonentiative</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">}</div></div></blockquote><blockquote type="cite"><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Just seeing if removing the parens reduces some of the noise.&nbsp;</div></div></blockquote><div><br></div></span><div>I would be happy with this.&nbsp; It is almost the same as what I had suggested, just using &gt; and &lt; rather than above and below (because that was what the proposal was using).&nbsp; Using words instead is fine with me.&nbsp; The parens are my biggest objection in this version.&nbsp; In the original version I also didn’t like the verbosity of `precedencegroup` and the redundant statement `precedence` inside the braces.</div><div><div class="h5"><br><blockquote type="cite"><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Sorry if I missed this suggestion earlier and it was denied :P</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Brandon&nbsp;</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><blockquote type="cite" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div><div dir="ltr"><div><div><div><br></div><div>- Anton</div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-05-21 0:25 GMT+03:00 Matthew Johnson<span>&nbsp;</span><span dir="ltr">&lt;<a href="mailto:matthew@anandabits.com" target="_blank">matthew@anandabits.com</a>&gt;</span>:<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"><div style="word-wrap:break-word"><br><div><span><blockquote type="cite"><div>On May 20, 2016, at 4:22 PM, Антон Жилин &lt;<a href="mailto:antonyzhilin@gmail.com" target="_blank">antonyzhilin@gmail.com</a>&gt; wrote:</div><br><div><div dir="ltr">Yes, in this case it should be allowed, because this relationship already existed in imported modules. I will add that, too, thanks!</div></div></blockquote><div><br></div></span><div>Cool.</div><div><br></div><div>What is the latest syntax you are using?&nbsp; Did you consider any of the lighter weight options?&nbsp; That subthread died without conclusion (unless I missed something somehow).</div><div><div><div><br></div><br><blockquote type="cite"><div><div dir="ltr"><div><div><br></div><div>- Anton</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-05-21 0:01 GMT+03:00 Matthew Johnson<span>&nbsp;</span><span dir="ltr">&lt;<a href="mailto:matthew@anandabits.com" target="_blank">matthew@anandabits.com</a>&gt;</span>:<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"><div style="word-wrap:break-word"><br><div><span><blockquote type="cite"><div>On May 20, 2016, at 3:51 PM, John McCall &lt;<a href="mailto:rjmccall@apple.com" target="_blank">rjmccall@apple.com</a>&gt; wrote:</div><br><div><div style="word-wrap:break-word"><div><blockquote type="cite"><div>On May 20, 2016, at 1:25 PM, Антон Жилин &lt;<a href="mailto:antonyzhilin@gmail.com" target="_blank">antonyzhilin@gmail.com</a>&gt; wrote:</div><div><div dir="ltr">Inline:<br><div class="gmail_extra"><br><div class="gmail_quote">2016-05-20 20:58 GMT+03:00 John McCall<span>&nbsp;</span><span dir="ltr">&lt;<a href="mailto:rjmccall@apple.com" target="_blank">rjmccall@apple.com</a>&gt;</span>:</div><div class="gmail_quote"><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 style="word-wrap:break-word"><div>The transitivity rule plus the ability to define precedence relationships in both directions on a new precedence group allows a new precedence group to create a precedence relationship between existing unrelated precedence groups.&nbsp; This should be forbidden.</div></div></blockquote><div><br></div><div>Agreed, although there is an alternate solution to allow global-scope relationship definition.</div><div>Trying to write it formally:</div><div><br></div><div>====begin====</div><div>Precedence relationships that, by transitivity rule, create relationship between two imported groups, is an error. Example:</div><div><br></div><div>// Module X</div><div>precedencegroup A { }</div><div>precedencegroup C { }</div><div><br></div><div>// Module Y</div><div>import X</div><div>precedencegroup B { precedence(&gt; A) precedence(&lt; C) }</div><div><br></div><div>This results in compilation error "B uses transitivity to define relationship between imported groups A and C".</div><div>The rationale behind this is that otherwise one can create relationships between standard precedence groups that are confusing for the reader.</div></div></div></div></div></blockquote><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>====end====</div></div></div></div></div></blockquote><div><br></div>Seems good to me.</div></div></div></blockquote><div><br></div></span><div>Would this be allowed if Module X already defined precedence group C &gt; A (it would not be defining a *new* relationship between A and C in that case)?</div><span><br><blockquote type="cite"><div><div style="word-wrap:break-word"><div><br><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><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 style="word-wrap:break-word"><div>What's the purpose of equality relationships between precedence groups?</div></div></blockquote><div><br></div><div>Agreed, will remove.</div></div></div></div></div></blockquote><div><br></div>Ok.</div><div>&nbsp;<br><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><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 style="word-wrap:break-word"><div>Your proposal should call out the special treatment of the Assignment and Ternary groups.</div></div></blockquote><div><br></div><div>Do you mean that most operators should define greater precedence than Assignment / Ternary? Or there should be some other special treatment?<br></div></div></div></div></div></blockquote><div><br></div></div>Just that they have implicit members.<div><br></div><div>John.</div></div></div></blockquote></span></div><br></div></blockquote></div><br></div></div></blockquote></div></div></div><br></div></blockquote></div><br></div></div></blockquote><blockquote type="cite" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span></div></blockquote></div></blockquote></div></div></div><br></div></blockquote></div><br></div>
</div></blockquote></body></html>