<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, May 11, 2016 at 7:50 AM, James Dempsey via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<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"><span class=""><div><blockquote type="cite"><div style="word-wrap:break-word"><div>So maybe that will conform to the API naming guideline?  Or would the verb have to be in the base name of the func?</div></div></blockquote></div></span><div><div style="word-wrap:break-word"><div><br></div><div>It seems from the guidelines that the intent is for the verb to be in the base name of the func, especially since there is another set of guidelines for naming function parameters.</div><div><br></div><div>In general the other methods in the proposal are verbs (perform(), notify(), wait(), cancel(), etc.)</div><div><br></div><div>At least for me, not including a verb makes the API read like the sentence “The dog quickly”.  This wasn’t so bad in the C API, because you could read the word ‘dispatch’ as the verb.</div><div><br></div><div><br></div><div>Looking at the current GDC API, it does seem like dispatching synchronously is the rare and special case.</div><div><br></div><div>Could there be just a single dispatch() method, with async as a flag with a default value of true?</div><div><br></div><div>It might be a little ugly because most of the other parameters of the proposed asynchronously() method would not apply in the sync case.</div></div></div></div></blockquote><div><br></div><div>This is a nice idea, but unfortunately it would defeat the ability to use @noescape/rethrows/generic-return-type for the sync version.</div><div><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><div style="word-wrap:break-word"><div><br></div><div>James</div><div><br></div><div><br></div></div></div><div><div class="h5"><br><div><blockquote type="cite"><div>On May 11, 2016, at 7:14 AM, Ricardo Parada &lt;<a href="mailto:rparada@mac.com" target="_blank">rparada@mac.com</a>&gt; wrote:</div><br><div><div style="word-wrap:break-word">Jacob Bandes-Storch suggested:<div><br></div><div><font face="Consolas">synchronously(execute work: …)</font></div></div></div></blockquote></div></div></div></div></blockquote><div><br></div><div>This wasn&#39;t meant to be a suggestion for the name, just pointing out what might have been a typo/inconsistency in the proposal. </div><div><br></div><div>Jacob</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><div class="h5"><div><blockquote type="cite"><div><div style="word-wrap:break-word"><div><br></div><div>So maybe that will conform to the API naming guideline?  Or would the verb have to be in the base name of the func?</div><div><br></div><div>Or perhaps:</div><div><br></div><div><div><font face="Consolas">synchronously(dispatch work: …)</font></div><div><div><font face="Consolas">asynchronously(dispatch work: …)</font></div></div><div><br></div><div><br></div><div><br></div><div><blockquote type="cite"><div>On May 11, 2016, at 9:32 AM, James Dempsey via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br><div><div>The method names</div><div><br></div><div><span style="white-space:pre-wrap">        </span>synchronously()</div><div><span style="white-space:pre-wrap">        </span>asynchronously() </div><div><br></div><div>are both adverbs, not noun phrases or verb phrases.</div><div>These methods have side effects, so each name should have a verb in it to make it a verb phrase.</div><div><br></div><br><div><div style="font-family:Helvetica;font-size:14px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Since these are the methods where you actually dispatch a block into a queue</div><div style="font-family:Helvetica;font-size:14px;font-style: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:14px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">dispatchSynchronously()</div><div style="font-family:Helvetica;font-size:14px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">dispatchAsynchronously()</div><div style="font-family:Helvetica;font-size:14px;font-style: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:14px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">would include the verb in the name of the methods.</div><br></div></div></blockquote></div><br></div></div></div></blockquote></div><br></div></div></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>