<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:#000000">In this case the @required callback is something *all* implementations should use for the mentioned reasons (memory leaks etc) just to clarify :).</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">
<p><b><font color="#cc0000">___________________________________</font></b></p><p><b>James⎥Lead Hustler</b></p><p><b><font color="#cc0000"><a href="mailto:james@supmenow.com" target="_blank">james@supmenow.com</a>⎥<a href="http://supmenow.com" target="_blank">supmenow.com</a></font></b></p><p><b><font size="2">Sup</font></b></p><p><b><font size="2">Runway East
</font></b></p><p><b><font size="2">10 Finsbury Square</font></b></p><p><b><font size="2">London</font></b></p><p><b><font size="2">
EC2A 1AF </font></b></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On 17 August 2016 at 11:31, Haravikk <span dir="ltr"><<a href="mailto:swift-evolution@haravikk.me" target="_blank">swift-evolution@haravikk.me</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On 17 Aug 2016, at 02:49, Boris Wang via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br>
><br>
> Why the callback is special ?<br>
><br>
> The compiler should has a warning for unused parameters of function.<br>
><br>
> I think this is enough. More works should be leaved for a lint tool.<br>
<br>
</span>Actually I think that that kind of warning should be left for linters as well; a protocol might define parameters that not all implementations use, or a type may define a method with a parameter that is intended only for future use (to avoid defining an overload later), these aren't necessarily problems.<br>
<br>
Also, how do you want to define unused? I suppose a non-escaping closure is unused if it's never called (since it can't be stored), but that doesn't guarantee that it *will* be called, which is the point of this proposal, i.e- a non-escaping closure may be part of a loop that may not execute, which is fine since it has no requirement to be used in every call, only that it isn't stored.<br>
<br>
So yeah, even if a warning like this could be done right, I'm not sure it replaces the case put forward for @required.</blockquote></div><br></div>