DEV Community

KhaledSalem
KhaledSalem

Posted on

async/await is NOT just syntax sugar for Promises

Most Frontend — and even many Node.js backend — developers think that:

async/await is just syntax sugar over Promises

That statement is practically misleading.

In real-world code, async/await is not just about how you write Promises
it is about how control flow and execution timing are expressed.

👉 In practice, async/await is *control-flow sugar*.


The hidden rule most people miss

Promises start executing immediately when they are created.
Not when you await them.
Not when you call .then().

Many people assume that this:

await A();
await B();
Enter fullscreen mode Exit fullscreen mode

Is equivalent to this:

A().then(() => B());
Enter fullscreen mode Exit fullscreen mode

This is correct

But they also assume it is equivalent to this:

A().then(() => B);
Enter fullscreen mode Exit fullscreen mode

This is NOT equivalent


Promise version (accidental parallelism)

const p1 = A(); // starts immediately
const p2 = B(); // starts immediately

p1.then(() => p2);
Enter fullscreen mode Exit fullscreen mode

What actually happens:

  • A() starts
  • B() also starts at the same time
  • .then() only controls when you consume the result, not when the work starts

➡️ Parallel execution — often unintentionally


async/await version (serialized by default)

await A(); // starts now, execution pauses
await B(); // starts later, after A completes
Enter fullscreen mode Exit fullscreen mode

What happens here:

  • A() is created and awaited
  • Execution pauses
  • B() does not even exist until A() finishes

➡️ Sequential execution — by design


The key difference (this is the insight)

Promises define asynchronous work
async/await defines *when that work is started*

Same runtime.
Same Promise engine.
Different control-flow guarantees.


Why async/await feels “safer” and more predictable

Because it forces you to be explicit about parallelism.

With Promises, it’s very easy to accidentally start work too early.
With async/await, work starts exactly where you write await.

If you want parallelism with async/await, you must explicitly opt in:

const p1 = A();
const p2 = B();

await p1;
await p2;
Enter fullscreen mode Exit fullscreen mode

Or:

await Promise.all([A(), B()]);
Enter fullscreen mode Exit fullscreen mode

Final takeaway

async/await is not just syntax sugar for Promises.
It is control-flow sugar that makes execution timing visible and intentional.

And that’s why, in practice, async/await changes how we think, not just how we write code.

Top comments (0)