<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Eh, I was trying to avoid grabbing another keyword, but I guess it's context-sensitive anyway.</div><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 11, 2015, at 18:26 , Jonathan Hise Kaldma &lt;<a href="mailto:info@hisekaldma.com" class="">info@hisekaldma.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class="">Shouldn't it be:</div><div class=""><br class=""></div><div class=""><span style="background-color: rgba(255, 255, 255, 0);" class="">func foo() yields -&gt; String</span><br class=""><br class="">Also +1 on the idea.<br class=""><br class="">/Jonathan</div><div class=""><br class="">12 dec. 2015 kl. 03:18 skrev Jordan Rose via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt;:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div class="">Another possible syntax, inspired by "throws".</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">func foo() yield -&gt; String</div></blockquote><div class=""><br class=""></div><div class="">I'm not sure what happens if a function both yields <i class="">and</i>&nbsp;throws. I guess that can't happen right now because generators are required not to throw when producing their next() value.</div><div class=""><br class=""></div><div class="">Jordan</div><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Dec 11, 2015, at 18:14 , Jordan Rose &lt;<a href="mailto:jordan_rose@apple.com" class="">jordan_rose@apple.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">It's desireable for the signature of a function to be fully checkable without looking at the body, for a number of reasons. It's also something clients of a library will want to know, so it needs to be displayed in the library's interface <i class="">somehow.</i></div><div class=""><i class=""><br class=""></i></div><div class="">Jordan</div><div class=""><br class=""></div><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Dec 11, 2015, at 18:03 , Andrey Tarantsov via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Do we actually need the "generator" keyword? Why can't the compiler figure it out by the presence of yield?<br class=""><br class="">And "yield" is a fairly standard keyword across languages, so no harm in claiming it, IMO.<br class=""><br class="">+1 on the proposal.<br class=""><br class="">A.<br class=""><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></div></blockquote></div><br class=""></div></div></blockquote></div><br class="">
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=3H-2Bjq6g-2FrmhPdZznzzcOM7hJzszzEydjVMmbmBFWR96hy3ygGRbQvIk8dH1OU0GUrZsSY94oup2S9SOuVr68dW16Zi1QKtsjo6Csz58uQD8QcJzyVyfawQOk8IF-2FVONNtG5WJkf7qwt6ZLkFy3dU-2BZMBejaeiXG5sx-2BbO7uixqBGcuk8I9SYKLXS-2BHb9h-2BVl2QnAkTZeOyj0J-2FFRA-2FboDWIiySmcPXADkcwoEyQuPxQ-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">

</div></blockquote><blockquote type="cite" class=""><div class=""><span class="">_______________________________________________</span><br class=""><span class="">swift-evolution mailing list</span><br class=""><span class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a></span><br class=""><span class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br class=""></div></blockquote></div></div></blockquote></div><br class=""></body></html>