---
title: "Discussion on \"Async by default: JavaScript++\" | Hashnode"
description: "Discussion on \"Async by default: JavaScript++\". Editor’s Note: I’m not a language designer, nor a compiler writer. I’d love to get feedback from others on why this idea would/wouldn’t work."
url: "https://hashnode.com/posts/async-by-default-javascript/636150e10aac083eae23ce22"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Async by default: JavaScript++](https://srjsdev.hashnode.dev/async-by-default-javascript?utm_source=hashnode&utm_medium=feed)

Editor’s Note: I’m not a language designer, nor a compiler writer. I’d love to get feedback from others on why this idea would/wouldn’t work.

Nov 1, 2022 · 4 min read · srjsdev.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#async](https://hashnode.com/tag/async)
-   [#asynchronous](https://hashnode.com/tag/asynchronous)
-   [#await](https://hashnode.com/tag/await)
-   [#promises](https://hashnode.com/tag/promises)

## Written by

[Steven Olsen](https://hashnode.com/@srjsdev)

@srjsdev

  
[View profile](https://hashnode.com/@srjsdev)

Online educator and mentor for Sr. JS developers

With 20+ years of dev experience, I'm an online educator, mentor, and consultant--teaching practical, advanced topics to developers like you on how to write: ✅ new AI/LLM features ✅ maintainable JS code ✅ scalable web apps ...yup that's about it! 🎤

## Responses 4

Markdown supported · ⌘↵ to post

[Manik](https://hashnode.com/@cloudaffle)

[Nov 2, 2022](https://hashnode.com/posts/async-by-default-javascript/636150e10aac083eae23ce22/comment/636291942576a880485c8f76)

I agree with [Paul-Sebastian Manole](https://hashnode.com/@brokenthorn) here. Also let's not forget how the JavaScript work behind the scenes. Promises are sent to the event loop to be processed once the stack is clear. There is a reason async functions are different from synchronous code that we write.

[Steven Olsen](https://hashnode.com/@srjsdev)

[Nov 10, 2022](https://hashnode.com/posts/async-by-default-javascript/636150e10aac083eae23ce22/comment/636291942576a880485c8f76#reply-636d2d66ea115907a994a538)

Hi [Manik](https://hashnode.com/@cloudaffle), thanks for the comment. You're right, JS is single threaded, but Promises technically use a separate "micro-queue" which recieved precendence over the event loop.

In either case, I mentioned "similar to multi-threading concepts" because of that fact of queues vs. threads. So you're correct, they are not the same!

But, if for a moment we set aside starvation (which is a real concern), and also web workers/etc -- then we really can conceptualize Promises as threads! And it's a very powerful way to think about them.

I've written up an Advanced JavaScript Promise slide deck; if you're interested I'll post the link.

[Manik](https://hashnode.com/@cloudaffle)

[Nov 10, 2022](https://hashnode.com/posts/async-by-default-javascript/636150e10aac083eae23ce22/comment/636291942576a880485c8f76#reply-636d312a2e3b6701485c24e5)

[Steven Olsen](https://hashnode.com/@srjsdev) sure would love to read. Drop me a link 👍

[Steven Olsen](https://hashnode.com/@srjsdev)

[Nov 10, 2022](https://hashnode.com/posts/async-by-default-javascript/636150e10aac083eae23ce22/comment/636291942576a880485c8f76#reply-636d44eb2e3b6701485c2725)

[Manik](https://hashnode.com/@cloudaffle) Here you go, enjoy!

[slides.com/solsen-tl/javascript-promises-beginner…](https://slides.com/solsen-tl/javascript-promises-beginner-to-advanced)

[Sofia ruby](https://hashnode.com/@Sofiaruby)

[Nov 2, 2022](https://hashnode.com/posts/async-by-default-javascript/636150e10aac083eae23ce22/comment/63625fde1178d47ddd6248e1)

Very good article for all of us.

[Eric Kwoka](https://hashnode.com/@thekwoka)

[Nov 2, 2022](https://hashnode.com/posts/async-by-default-javascript/636150e10aac083eae23ce22/comment/63625ece1178d47ddd6248b5)

I think it could create extra confusion.

Also, the autoboxing thing you describe doesnt happen. If the thing isn't a promise, await doesn't make it a promise. It just does nothing.

[Steven Olsen](https://hashnode.com/@srjsdev)

[Nov 10, 2022](https://hashnode.com/posts/async-by-default-javascript/636150e10aac083eae23ce22/comment/63625ece1178d47ddd6248b5#reply-636d31a0ea115907a994a572)

That's why it's called JavaScript++, it's not backwards compatible and requires a new mental model 😉.

You could be right [Eric Kwoka](https://hashnode.com/@thekwoka), I'm not familiar with the implementation details. That sounds like an efficiency optimization, though. But conceptually, to cover all the cases in a uniform way, the auto-boxing strategy could work.

(Promises are so cool. Just try `Promise.resolve(Promise.resolve(5))` if you don't believe me, lol.)

But actually, I introduced it more as a (valid) concept to bridge us over to the async-by-default model.
