max-mapper / max-mapper/callback-hell
Other, more striking callback issues are not mentioned
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- JavaScript
- Estrellas
- 858
- Forks
- 101
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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?
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Revisa el contenido existente de la página web del repositorio y la sección de callbacks tratada en issue #26. Añade una cobertura breve de los problemas enumerados de control de callbacks, temporización, excepciones y convenciones, y luego verifica que la página refleje las preocupaciones más amplias, más allá de la indentación.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript
- Área
- documentation
- Tipo de issue
- Documentación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100