<div dir="ltr"><div class="gmail_extra">Hi Mike,</div><div class="gmail_extra"><br><div class="gmail_quote">2017-10-15 14:55 GMT+02:00 Mike Kluev <span dir="ltr">&lt;<a href="mailto:mike.kluev@gmail.com" target="_blank">mike.kluev@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span class="gmail-">On 15 October 2017 at 13:35, Geordie Jay <span dir="ltr">&lt;<a href="mailto:geojay@gmail.com" target="_blank">geojay@gmail.com</a>&gt;</span> wrote:</span><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Also we&#39;re not talking about whether the Bool itself is discardable. For example, it makes no sense to write:</div><div><br></div><div><b>let something: discardable Bool = true</b></div></div></blockquote><div><br></div></span><div>you can&#39;t write this either:</div><div><br></div><div>let something: inout Bool = true</div><div><br></div><div>that doesn&#39;t mean &quot;inout&quot; should be &quot;@inputOutput&quot; before the parameter name in function signature.</div></div></div></div></blockquote><div><br></div><div>This is a different case: inout is an annotation on argument types (of which there can be many).</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>my litmus test is: &quot;if we did it now in swift 0.0 what would we do&quot;. discardable before type passes this test, @discardableResult before function doesn&#39;t.</div></div></div></div></blockquote><div><br></div><div>I don&#39;t understand what you&#39;re saying here. &quot;Now in swift 0.0&quot;? The first public version of Swift had this same functionality in its same form, with the name @warn_unused_result. The current version is just reversed, which to me is a logical change.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>There has been some discussion of &quot;throws&quot; as a keyword. If anything I think that is something that is in more need of change. I&#39;ve always read it (frustratingly) as e.g. &quot;func throws Bool&quot;, which it doesn&#39;t, it throws an Error.</div></div></blockquote><div><br></div></span><div>indeed. that&#39;s why &quot;throws Bool&quot; is wrong and if anything, i am advocating for:</div><div><br></div><div>throwing func foo() -&gt; Bool</div></div></div></div></blockquote><div><br></div><div>I personally like that syntax, because that&#39;s exactly how I <i>talk</i> about such a function. &quot;oh that&#39;s a throwing function so you need to call it with <b>try</b>&quot;.</div><div><br></div><div>As an extension to that, I&#39;d also say &quot;you can call that function without a preceding variable assignment because it has a discardable result&quot;. I would never say &quot;this function returns a discardable boolean&quot; because that just doesn&#39;t match my mental model of what&#39;s going on. To me, it&#39;s the <i>function</i> whose return value can be discarded — in theory it has nothing to do with the result itself. But it&#39;s quite possible I&#39;m in the minority here.</div><div> </div><div>- Geordie</div></div></div></div>