> On 20 Apr 2016, at 15:40, Erica Sadun <[email protected]> wrote:
> 
> 
>> On Apr 20, 2016, at 5:09 AM, Jeremy Pereira 
>> <[email protected]> wrote:
>> 
>> 
>>> On 19 Apr 2016, at 17:24, Erica Sadun via swift-evolution 
>>> <[email protected]> wrote:
>>> 
>>>> 
>>> Short of a complete rethink of closure syntax, requiring parentheses there 
>>> would not improve the language in any measurable way.
>> 
>> Does requiring the parentheses in (T1) -> T2 improve the language in any 
>> measurable way?
> 
> I believe it does, as the parens are already required at call sites and in 
> function declarations, and when using functions with more than one argument.

I’m sorry, but the one statement does not follow from the other. That 
parentheses are required at call sites and in function declarations (NB: but 
not in closure definitions) does not imply that the language would be 
measurably improved by mandating them in function type declarations of the form 
T1 -> T2 as well.

In fact, it seems to me, that, generally, the language designers took the 
opposite point of view, namely that the language is measurably improved by 
allowing coders to omit syntax where the omission does not result in ambiguity. 
For instance, we can omit the statement terminator for the last statement on a 
line, type annotations for let and var identifiers where the type can be 
inferred, pretty much everything in a closure’s parameter and return type 
declaration.
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to