[swift-evolution] Required Callback

James Campbell 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
warning.​

*___________________________________*

*James⎥Lead Hustler*

*james at supmenow.com <james at supmenow.com>⎥supmenow.com <http://supmenow.com>*

*Sup*

*Runway East *

*10 Finsbury Square*

*London*

* 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日
> 周三06:39写道:
>
>> ​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
>> <http://supmenow.com>*
>>
>> *Sup*
>>
>> *Runway East *
>>
>> *10 Finsbury Square*
>>
>> *London*
>>
>> * 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
>> https://lists.swift.org/mailman/listinfo/swift-evolution
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160817/cc16a4ed/attachment.html>


More information about the swift-evolution mailing list