4 ms·
If you're going to take that approach why have any keyword? `foo(){}` is just as clear as `fn foo(){}`
by stephenr 3y ago
If you're going to take that approach why have any keyword?
`foo(){}` is just as clear as `fn foo(){}`
- fijiaarone 3y agoA block is a namespace that has an entry point, and optionally a return value and arguments. There is no need to distinguish between functions, modules classes, lambdas, or whatever. Hence, no need to distinguish their start or ending with keywords, as long as you can determine their scope. Brackets determine scope, and unlike indentation or words, that is all they are used for.