HenrikJoreteg / HenrikJoreteg/human-javascript
Improve function binding section per feedback via email:
- Dominant language
- CSS
- Stars
- 82
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
So, the 2% I didn't like is the Gotchas Function Binding section. I commend you for taking it on, there aren't a lot of clear explanations of invocation context in JavaScript out there and it's something a lot of people are confused about way longer than they should be. Unfortunately this felt to me like the weakest part of a great book.
The .bind example is pretty painful. `myFunction = var myFunction = function () {` yikes :P. It makes it unclear that binding returns a copy of a function instead of modifying the original, and just isn't interesting or concise like the other examples are.
You skip the most confusing way to call a function, new. Bleh. It's a pain in the ass to explain, but this section feels incomplete without it.
Some of the language in this section is kind of loose, not wrong, but not as clear as it could be. Some refactoring is probably in order, with more deliberate choices in terminology and making sure the explanation builds through the chapter. This is kinda wishy washy, but I don't think I can explain it any better at a high level.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.