> On Nov 10, 2017, at 12:16 PM, Goffredo Marocchi <[email protected]> wrote:
> 
> 
> Sent from my iPhone
> 
>> On 10 Nov 2017, at 19:42, Joe Groff via swift-evolution 
>> <[email protected]> wrote:
>> 
>> Through great pain and community anguish, we pushed ourselves to a model 
>> where argument labels are parts of the declaration name, not part of the 
>> call argument
> 
> Hey Joe, does this mean it is likely there is little to no chance to have 
> argument labels for closures and stored functions back? Sorry to bring noise 
> in here, but your words put a grim outlook on something the core team said it 
> would be revisited last year in the next Swift iteration.

Not at all. The idea for closure labels is that the labels would still be part 
of the name, but that you could give compound names to closure variables in 
addition to named functions. That would let you write something like:

let foo(bar:) : (Int) -> String = { "\($0)" }
foo(bar: 0)

Or, with a bit more sugar:

        let foo : (bar: Int) -> String = { "\($0)" } // Notationally, we write 
the labels with the type, but they become part of the 'let' name
        foo(bar: 0)

-Joe
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to