<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><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" 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 -> String</div></blockquote></div></div></blockquote><div><br class=""></div><div>Well, again, yielding is an implementation detail. What's the advantage vs returning Generator<String>? I don't think that lying about the return type is useful for anyone.</div><br class=""><blockquote type="cite" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I'm not sure what happens if a function both yields <i class="">and</i> throws.</div></div></blockquote><div><br class=""></div><div>An excellent question. We'd need another generator type with "next() throws".</div><div><br class=""></div><div>A.</div><div><br class=""></div></div></body></html>