<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br></div><div id="AppleMailSignature">Hello,</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">In the light of this proposal <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0066-standardize-function-type-syntax.md">https://github.com/apple/swift-evolution/blob/master/proposals/0066-standardize-function-type-syntax.md</a></div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">I suggest to do similar for closure arguments.</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">Right now we can define our closure arguments in 3 ways:</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">let closure: (String) -> Int = {</div><div id="AppleMailSignature"> value -> Int in</div><div id="AppleMailSignature"> return 0</div><div id="AppleMailSignature">}</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature"><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);">let closure2: (String) -> Int = {</span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);"> (value) -> Int in</span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);"> return 0</span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);">}</span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div id="AppleMailSignature"><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);">let closure3: (String) -> Int = {</span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);"> (value:String) -> Int in</span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);"> return 0</span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);">}</span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);">The first version, could be abolished in light of the above proposal. It would avoid confusion and improve the learning curve. The 1st example doesn't allow either to add the type as we did in example 3.</span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div id="AppleMailSignature">What are your thoughts?</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">João</div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div id="AppleMailSignature"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div></div><br>Sent from my iPhone</div></body></html>