<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Without the “let” is not objectionable, using your example:</div><div class=""><br class=""></div><span class="Apple-tab-span" style="white-space: pre;">        </span>let chainable = Chainable()<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>for _ in 0 ..< 10 {<br class=""><span class="Apple-tab-span" style="white-space: pre;">                </span>if getSomeCondition() {<br class=""><span class="Apple-tab-span" style="white-space: pre;">                </span> <span class="Apple-tab-span" style="white-space: pre;">        </span>_ = chainable.add(5)<br class=""><span class="Apple-tab-span" style="white-space: pre;">                </span>} else {<br class=""><span class="Apple-tab-span" style="white-space: pre;">                </span> _ = chainable.add(2)<br class=""><span class="Apple-tab-span" style="white-space: pre;">                </span>}<br class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>}</div><div class=""><br class=""></div><div class="">Let is unnecessary since we are just throwing away the result we don’t need the keyword. It is optional. I don’t think @ignoreUnusedResult or the other options looks very nice either. </div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></div><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"></div></div><div><blockquote type="cite" class=""><div class="">On Feb 24, 2016, at 11:50 PM, Haravikk <<a href="mailto:swift-evolution@haravikk.me" class="">swift-evolution@haravikk.me</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 25 Feb 2016, at 05:19, Paul Ossenbruggen via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">These lack conciseness. What about the already supported: <div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div style="font-size: 13px;" class=""><b class="">let _ = </b>ingoreResult()</div></blockquote></div></div></blockquote><br class=""></div><div class="">This could work until we gain some other, general purpose, method to suppress warnings, though it isn’t pretty IMO. For example, if a class’ methods are designed to be chain able then the result isn’t necessary (it’s just self), so in things like loops you could end up having to use let _ an awful lot, like so:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>class Chainable {</div><div class=""><span class="Apple-tab-span" style="white-space:pre">                </span>var value = 0</div><div class=""><span class="Apple-tab-span" style="white-space:pre">                </span>func add(add:Int) {</div><div class=""><span class="Apple-tab-span" style="white-space:pre">                        </span>value += add</div><div class=""><span class="Apple-tab-span" style="white-space:pre">                        </span>return self</div><div class=""><span class="Apple-tab-span" style="white-space:pre">                </span>}</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let chainable = Chainable()</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>for _ in 0 ..< 10 {</div><div class=""><span class="Apple-tab-span" style="white-space:pre">                </span>if getSomeCondition() {</div><div class=""><span class="Apple-tab-span" style="white-space:pre">                        </span>let _ = chainable.add(5)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">                </span>} else {</div><div class=""><span class="Apple-tab-span" style="white-space:pre">                        </span>let _ = chainable.add(2)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">                </span>}</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div class=""><br class=""></div><div class="">Stupid example, but imagine if there were a few other operations, perhaps handled by other conditionals, then suddenly you end up with a lot of these let _ statements, which is why being able to suppress the warnings in all cases is still desirable.</div><div class=""><br class=""></div><div class="">On the topic of verbosity in the attribute, I don’t think there’s any need to go to four words; the current attribute is @warn_unused_result, and I think that @ignore_unused_result works a direct opposite (i.e- the result being unused is still strange to the compiler, but it chooses not to issue a warning about it). I’m only using snake case because that’s what the current value has, obviously we’ll adjust for whatever the final attribute naming convention turns out to be.</div></div></div></blockquote></div><br class=""></body></html>