[swift-evolution] [Pitch] Improving capturing semantics of local functions
C. Keith Ray
keithray at mac.com
Sun Nov 12 23:00:35 CST 2017
> Another option that reads nicely IMHO is
>
> func fn<T>(param: T) throws -> T where T : Equatable [foo, bar] { … }
>
I changed my mind. Putting the capture list just before { } is where I'd rather see it.
> I think #4 is ambiguous with array literals unfortunately.
>
> Perhaps this proposal should be split in two — the ‘self.’/escaping part is source breaking, and will likely require more discussion. Adding capture lists to local functions seems like a more straightforward change.
>
> Slava
>
>>
>> --
>> Brent Royal-Gordon
>> Architechies
>>
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-evolution
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
More information about the swift-evolution
mailing list