[swift-evolution] [Pitch] Improving capturing semantics of local functions
Chris Lattner
clattner at nondot.org
Mon Nov 20 21:00:19 CST 2017
> On Nov 12, 2017, at 8:52 PM, Slava Pestov via swift-evolution <swift-evolution at swift.org> wrote:
>
>
> func fn<T>(param: T) throws -> T where T : Equatable [foo, bar] { … }
+1, potentially adding a context sensitive keyword like “capturing” before 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.
+1.
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171120/d0d71512/attachment.html>
More information about the swift-evolution
mailing list