JavaScript: promises vs callbacks

Open
#177 22 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript
Domain
documentation

Research direction

No repository file, test, or entry point is named. Start by reading the issue discussion and determine whether a concise documentation response is still wanted; done would be a settled, succinct explanation of what promises enable beyond callbacks.

Written by the indexing model from the issue text.

Description

What do promises do/make possible that callbacks don't?

i've been writing large pieces of code in JavaScript for about seven years, all flow is via callbacks because:

  1. That's all that existed when I started.
  2. I like them, I think in terms of them.
  3. My editor is proficient at managing them.
  4. All this proficiency didn't come cheaply. A lot of time went into it.

I'm a big believer in this: one way of doing something is better than two, no matter how much better the second way is. Why? Because I'm going to end up supporting both.

Here's some space, please help me understand why you think promises is a game-changer. The more succinct the answer the better. Thanks.

Dominant language
HTML
Stars
134
Forks
10
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from scripting/Scripting-News

All issues in scripting/Scripting-News

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.