> On Nov 14, 2017, at 6:56 PM, Howard Lovatt via swift-evolution
> <[email protected]> wrote:
>
> 2. Allow closures when assigned to a function type to be:
> 2a. Recursive.
Local functions can also be mutually recursive:
func f() {
func foo() { bar() }
func bar() { foo() }
}
This would not work with let bindings, which are not visible before the
location where they are defined.
> 2b. Annotatable with:
> 2bi. @inline
Neither closures nor local functions benefit from being annotated with
@_inlineable, because they can only be referenced from inside their defining
function, and not across module boundaries. So the optimizer can already inline
the function or closure if needed.
> 2bii. @escaping
> 2c. Generic.
See my other response to this thread.
Slava
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution