<div id="__MailbirdStyleContent" style="font-size: small;font-family: Tahoma;color: #000000"><blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;"><p style="color: #AAAAAA; margin-top: 10px;">On 3/2/2016 4:13:38 PM, Brent Royal-Gordon <brent@architechies.com> wrote:</p>> 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>>
<br>> let _ = discardableResult()
<br>
<br>Do you really want to require that for, say, `RangeReplaceableCollectionType.removeLast()`? Because that's what this implies.
</blockquote><div style="margin-top: 16px; margin-bottom: 20px">Possibly. I'm genuinely interested in the number of APIs like that. Even if we did want that, I would still prefer a non-attribute solution to the problem.</div><div style="margin-top: 16px; margin-bottom: 20px">Swift already allows overloading based on return-type. One of the problems is that it's just not good at picking the one that you'd want.</div><div style="margin-top: 16px; margin-bottom: 20px">func removeLast() { let _ = removeLast() }<br>func removeLast() -> Self.Generator.Element { ... }<br></div><div style="margin-top: 16px; margin-bottom: 20px">foo.removeLast() // ok, no warning as there is void version<br>let item = foo.removeLast()<br></div><blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">I don't think that's a good idea. It would make the warning more noisy, which would ultimately make it meaningless.
<br>
<br>> For resiliency, is adding a `@discardable` attribute a breaking change? Removing it?
<br>
<br>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.</blockquote><div style="margin-top: 16px; margin-bottom: 20px">At the very least, it's a source-level breaking change. </div><blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;"></blockquote>
</div>