max-mapper / max-mapper/callback-hell

Other, more striking callback issues are not mentioned

Offen
#26 1 Kommentar 4 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
JavaScript
Sterne
858
Forks
101
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Überprüfe die bestehenden Webseiteninhalte des Repositorys und den in issue #26 besprochenen callback-Abschnitt. Füge eine kurze Abdeckung der aufgeführten Probleme bei der Callback-Steuerung, der Zeitsteuerung, bei Ausnahmen und Konventionen hinzu und verifiziere anschließend, dass die Seite die weitergehenden Anliegen über die Einrückung hinaus widerspiegelt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
documentation
Issue-Typ
Dokumentation
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.