<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="">I really like the proposal use of @discardable, i would add to it that the word “let" is optional in the proposal. Because we are not using the result it does not matter that that keyword is there. It follows the pattern already established in for loops. <div class=""><br class=""><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">for _ in nodes {</div><div class="">}</div></blockquote><div class=""><br class=""></div><div class="">No let there. So:</div><div class=""><br class=""></div><div class=""> <span class="Apple-tab-span" style="white-space:pre">        </span>_ = discardableResult() </div><div class=""><br class=""></div><div class="">Makes sense and is much more concise. </div><div class=""><br class=""></div><div class="">One other question, for pure functions, would it be desirable to have it be an error that the caller never uses the result and that _ = is not an acceptable thing to do for them? </div><div class=""><br class=""></div><div class="">- Paul</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 2, 2016, at 8:16 PM, Chris Lattner 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=""><div class=""><br class=""><blockquote type="cite" class="">On Mar 2, 2016, at 4:13 PM, Brent Royal-Gordon <<a href="mailto:brent@architechies.com" class="">brent@architechies.com</a>> wrote:<br class=""><br class=""><blockquote type="cite" class="">My primary preference is to just say that's the way it is. I don't particular like any of the attributes. Also, we have a mechanism to discard the result already:<br class=""><br class="">let _ = discardableResult()<br class=""></blockquote><br class="">Do you really want to require that for, say, `RangeReplaceableCollectionType.removeLast()`? Because that's what this implies.<br class=""></blockquote><br class="">I don’t get that. If X.removeLast() returned a result, but also had an important side effect, I would expect it to be one of the (few but important) cases that would be marked with the @discardable attribute, so it would not produce a warning.<br class=""><br class=""><blockquote type="cite" class="">I don't think that's a good idea. It would make the warning more noisy, which would ultimately make it meaningless.<br class=""><br class=""><blockquote type="cite" class="">For resiliency, is adding a `@discardable` attribute a breaking change? Removing it?<br class=""></blockquote><br class="">If it has any resiliency implications at all, removing it would break. But I don't think it would; it merely controls a warning, and doesn't necessarily imply any change in semantics.<br class=""></blockquote><br class="">I can’t imagine any scenario where @discardable would impact resilience.<br class=""><br class="">-Chris<br class=""><br class="">_______________________________________________<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></div></blockquote></div><br class=""></div></div></body></html>