let closure = { (args) -> ReturnT in ... } v.s.vs
func function(args) -> ReturnT { ... } Why didn't Apple follow the principle of Occam's razor and make closure and function declarations to be equal? For example, a closure could be defined like this:
let closure = (args) -> ReturnT { ... } This is how it is implemented in JavaScript and other scripting languages. This is also looks more reasonable because functionfunctions and closureclosures are actually identical. And, in contrary
In addition, putting arguments and the return type inside the brackets looks weird and could messconfuse a programmer.