3 ms·
What’s New in Swift 3?
- marvel_boy 10y agoSwift will be available in a lot platforms. Do you think it has potencial to became the 'new Java'?
- ubertaco 10y agoHuh. Looking at the code snippets, I find this: func g(a: Int -> Int) -> Int -> Int { ... } // old way, Swift 2 much easier to read than this: func g(a: (Int) -> Int) -> (Int) -> Int { ... } // new way, Swift 3 The old way is obvious: g takes a function from Int to Int, along with an Int, and produces an Int -- and I can tell that it's curried. It reads just like a type signature from any given ML. The new way confused me at a glance, because my eyes got lost in all the parens and I read (a: (Int) -> Int) as (a: (Int -> Int), with a missing paren, which threw everything after it off and made it confusing. It just adds another, unnecessary layer of parens. Weird.