<div dir="ltr"><div>Premise: there are multiple ways of describing control-/data-flow when a function is called:</div><div><br></div><div><font face="arial, helvetica, sans-serif"> func x() <b>-> T</b> // x returns a value, of type T, to the caller</font></div><div><font face="arial, helvetica, sans-serif"> func x() <b>throws</b> // x may throw an error to the caller</font></div><font face="arial, helvetica, sans-serif"> func x() <b>throws -> T</b> // x may throw an error, and also return a value</font><div><font face="arial, helvetica, sans-serif"> func x(...) <b>rethrows</b> ... // if a closure argument can throw an error, x may also throw</font><div><font face="arial, helvetica, sans-serif"> <b>@noreturn</b> func x() // x never returns to the caller</font></div><div><br></div><div>"noreturn" is currently spelled as an attribute, but like "throws" / "rethrows" / "-> T", it's really describing how control flow works.</div><div><br></div><div>IMO this calls for consistency: whatever happens "after" the function is called should appear "after" the parameter list.</div><div><br></div><div><font face="arial, helvetica, sans-serif"> func x() <b>noreturn</b> {</font></div><div><font face="arial, helvetica, sans-serif"> ...</font></div><div><font face="arial, helvetica, sans-serif"> }</font></div><div><br></div><div><br></div>Thoughts?<br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><br></div><div>Jacob<br></div></div></div></div>
</div></div>