[swift-evolution] Required Callback
james at supmenow.com
Wed Aug 17 03:31:46 CDT 2016
Thats true, my only concern with that is if the user disables that
*james at supmenow.com <james at supmenow.com>⎥supmenow.com <http://supmenow.com>*
*Runway East *
*10 Finsbury Square*
* EC2A 1AF *
On 17 August 2016 at 02:49, Boris Wang <kona.ming at gmail.com> wrote:
> Why the callback is special ?
> The compiler should has a warning for unused parameters of function.
> I think this is enough. More works should be leaved for a lint tool.
> James Campbell via swift-evolution <swift-evolution at swift.org>于2016年8月17日
>> I'm not sure about that last question, I guess someone who knows more
>> about it than me could answer.
>> *James⎥Lead Hustler*
>> *james at supmenow.com <james at supmenow.com>⎥supmenow.com
>> *Runway East *
>> *10 Finsbury Square*
>> * EC2A 1AF *
>> On 16 August 2016 at 23:37, James Campbell <james at supmenow.com> wrote:
>>> @noescape is a hint that the callback will only be called once and
>>> allows compiler to optimise, we may or may not be able to combine @required
>>> functionality into that but it looks like it was rejected for now.
>>> @required is a compiler hint / sanity check to enforce that the callback
>>> is actually called once by the developer. There is no focus on any compiler
>>> enhancements other than that.
>> swift-evolution mailing list
>> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution