4 ms·
With syntax highlighting being ubiquitous, does it really matter whether the keyword is "function" or "fn"? And at that point, why not make it terse instead of
by RussianCow 3y ago
With syntax highlighting being ubiquitous, does it really matter whether the keyword is "function" or "fn"? And at that point, why not make it terse instead of taking up more space and adding unnecessary noise?
- stephenr 3y agoIf 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.