Hacker News new | ask | show | jobs
by earthboundkid 2398 days ago
That’s a weird choice. Arrow functions in JS don’t redefine ‘this’ like regular functions, so if you don’t use them, you waste time working around the redefinition.
1 comments

Also, if you default to `() => ...` for anonymous functions, then you can reserve anonymous `function() { ... }` for the rare times you actually want peculiar `this`. Same reason it's nice to default to `const` so that `let` becomes a signal for the bonus feature of reassignment.
> Same reason it's nice to default to `const` so that `let` becomes a signal for the bonus feature of reassignment.

Code documentation should be clear and concise, not to be deciphered through the code author's take on the meta meaning of reserved words.

No, const inside of a function is a complete waste of time. There has never been a bug that would be prevented by const inside a function.