<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, May 20, 2016 at 5:06 PM, Brandon Knope via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<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="auto"><span class=""><div></div><div><br></div><div><br>On May 20, 2016, at 5:56 PM, Антон Жилин via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:<br><br></div><blockquote type="cite"><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> associativity(left)</div><div> above(Additive)</div><div> below(Exponentiative)</div><div>}</div></div></div></div></blockquote><div><br></div></span><div>Why not:</div><div><br></div><div>precedence Multiplicative {</div><div> associativity left</div><div> above Additive</div><div> below Epxonentiative</div><div>}</div><div><br></div><div>Just seeing if removing the parens reduces some of the noise. </div><div><br></div><div>Sorry if I missed this suggestion earlier and it was denied :P</div><div><br></div></div></blockquote><div><br></div><div>+1 to this, or a version with colons and commas</div><div> </div><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="auto"><div></div><div>Brandon </div><div><div class="h5"><div><br></div><div><br></div><br><blockquote type="cite"><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 dir="ltr"><<a href="mailto:matthew@anandabits.com" target="_blank">matthew@anandabits.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 style="word-wrap:break-word"><br><div><span><blockquote type="cite"><div>On May 20, 2016, at 4:22 PM, Антон Жилин <<a href="mailto:antonyzhilin@gmail.com" target="_blank">antonyzhilin@gmail.com</a>> 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? Did you consider any of the lighter weight options? 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 dir="ltr"><<a href="mailto:matthew@anandabits.com" target="_blank">matthew@anandabits.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 style="word-wrap:break-word"><br><div><span><blockquote type="cite"><div>On May 20, 2016, at 3:51 PM, John McCall <<a href="mailto:rjmccall@apple.com" target="_blank">rjmccall@apple.com</a>> wrote:</div><br><div><div style="word-wrap:break-word"><div><blockquote type="cite"><div>On May 20, 2016, at 1:25 PM, Антон Жилин <<a href="mailto:antonyzhilin@gmail.com" target="_blank">antonyzhilin@gmail.com</a>> 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 dir="ltr"><<a href="mailto:rjmccall@apple.com" target="_blank">rjmccall@apple.com</a>></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. 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(> A) precedence(< 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 > 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> <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></div></div><span class=""><blockquote type="cite"><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><br></div></blockquote></span></div><br>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
<br></blockquote></div><br></div></div>