<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Oooo, I really like this.<div class=""><br class=""></div><div class="">It also brings up an interesting point on the whole async discussion. Doesn’t the async apply to the <i class="">return value</i>&nbsp;and not the other stuff?</div><div class=""><br class=""></div><div class="">IE instead of:</div><div class=""><br class=""></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">async func getBool() → Bool</span></font></div><div class=""><br class=""></div><div class="">It could be:</div><div class=""><br class=""></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">func getBool() → async Bool</span></font></div><div class=""><br class=""></div><div class="">Dave<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 9, 2017, at 9:58 AM, Fil Ipe 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 dir="ltr" class=""><div style="font-size:12.8px" class=""><span style="font-size:12.8px" class="">I find it extremely cumbersome to have to precede&nbsp;a function declaration with such an extensive annotation such as @discardableResult</span><br class=""></div><div style="font-size:12.8px" class=""><br class=""></div><div style="font-size:12.8px" class="">Now that so many functions do need this annotation to be there, our code became so ugly.</div><div style="font-size:12.8px" class=""><br class=""></div><div style="font-size:12.8px" class="">Besides, having this annotation precede the function declaration kind of reminds me of C rather than Swift.&nbsp;<span style="font-size:12.8px" class="">Since in C the</span><span style="font-size:12.8px" class="">&nbsp;function declarations started by the type of the return value.</span></div><div style="font-size:12.8px" class=""><br class=""></div><div style="font-size:12.8px" class="">I,&nbsp;therefore, think it would be much softer on the eye, and much more precise in intent, to instead&nbsp;precede&nbsp;the result of a&nbsp;func&nbsp;with a simpler and shorter @discardable annotation</div><div style="font-size:12.8px" class=""><br class=""></div><div style="font-size:12.8px" class="">So it would be:</div><div style="font-size:12.8px" class=""><br class=""></div><span style="font-size:12.8px" class="">func() -&gt; @discardable Bool { }&nbsp;</span><div style="font-size:12.8px" class=""><div class=""><br class=""></div><div class="">Rather than:&nbsp;</div><div class=""><br class=""></div><div class="">@discardableResult func() -&gt; Bool { }&nbsp;</div><div class=""><div class=""><br class=""></div><div class="">It could be even better if someone could perhaps find a shorter word that is a synonym for the word "discardable", that would be as explicit in intent as the word "discardable" is in such context, yet be written with fewer characters.</div></div><div class=""><br class=""></div></div><div style="font-size:12.8px" class="">Swift regards,</div><div style="font-size:12.8px" class="">Filipe Sá.</div></div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></body></html>