Dropping the fn keyword causes no ambiguities in the grammar. It's easy to parse (both for humans and the compiler) because all the other declarations start with a keyword (currently: type, trait).
Adding constant declarations should also not be a problem, we can decide whether we're parsing a function or a constant based on the left paren.
Dropping the
fn
keyword causes no ambiguities in the grammar. It's easy to parse (both for humans and the compiler) because all the other declarations start with a keyword (currently:type
,trait
).Adding constant declarations should also not be a problem, we can decide whether we're parsing a function or a constant based on the left paren.
The
fn
keyword would still be used for lambdas.