[swift-evolution] [Pre-proposal] Fix function type grammar

Anton Zhilin antonyzhilin at gmail.com
Sun Jul 3 09:28:09 CDT 2016

You can view proposed function type grammar here:

Notion of tuple was removed; instead, parentheses are now merely part of 
function type grammar.

An important implication is that types () -> T  and  ( () ) -> T become 
completely different: the first accepts no parameters, and the second 
accepts a single parameter of type ().

===copy of gist begins===
function-type → ( function-type-parameters opt ) throws-annotation opt -> 

function-type-parameters → function-type-parameter , function-type-

function-type-parameters → function-type-parameter ...opt

function-type-parameter → attributes opt inout opt type

throws-annotation → throws | rethrows

More information about the swift-evolution mailing list