<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 like this a lot.<div class=""><br class=""></div><div class="">-- E<br class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 25, 2016, at 1:13 AM, Nicola Salmoria 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=""><div class="">I agree that the attribute should be attached to the return type instead that to the function.</div><div class=""><br class=""></div><div class="">I’d say that the cases where it’s ok to discard the result are when the result is not strictly part of the API, but provided because it could be useful to the caller. An attribute that would naturally describe this could be</div><div class=""><br class=""></div><div class="">@convenience</div><div class=""><br class=""></div><div class="">The first example that comes to mind is Dictionary.updateValue. The declaration could then become</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">public</span> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">mutating</span> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">func</span> updateValue(value: <span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Value</span>, forKey key: <span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Key</span>) -> @convenience <span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Value</span>?</div></div><div class=""><br class=""></div><div class="">Nicola</div></div></div></blockquote></div><br class=""></div></div></body></html>