max-mapper / max-mapper/callback-hell
Other, more striking callback issues are not mentioned
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 858
- Forks
- 101
- PR merge metrics
- No merged PRs in 30d
Description
Using callbacks comes with many issues and indentation with curly braces jungle is but one of them. By passing a callback you are passing the control over to a potentially buggy code with undesired behaviour.
The callback problems are:
- callback can be called once, twice, infinitely many times, or never, and you have no control over it
- callback can be called in synchronous or asynchronous fashion
- callbacks swallow exceptions and force developers to conventions
- callbacks make writing the curlybraced and indented code easy
I did not invent all of it myself, I learned a lot in YDKJS: https://github.com/getify/You-Dont-Know-JS/blob/master/async%20&%20performance/ch2.md
Yet the webpage only mentions the last one, from my point the least important one. Is it possible to at least mention that there are other, more serious problems, which actually turn this whole area into a real hell?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the repository's existing webpage content and the callback section discussed in issue #26. Add brief coverage of the listed callback-control, timing, exception, and convention problems, then verify that the page reflects the broader concerns beyond indentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100