[swift-evolution] [Proposal draft #2] Naming Functions with Argument Labels

Brent Royal-Gordon brent at architechies.com
Tue Jan 12 01:22:15 CST 2016


>> foo(bar:(Int))
>> (that's why I wanted to avoid the parenthesis in the first place…)
> 
> It’s grammatically ambiguous if you don’t have the “:)” at the end

Is it? It's not legal to pass a type name—`foo(bar: Int)` is not legal code; you have to say `foo(bar: Int.self)`.

-- 
Brent Royal-Gordon
Architechies



More information about the swift-evolution mailing list