3

I understand async/await are really just promises but I'm curious if there's a reason not to make all functions async and await all value for consistency?

My Question

Is there any issues or implications to making all functions async? Are there any drawbacks?

This is for both Node.js and Client side systems (transpiled)

2

1 Answer 1

0

For many functions, you just want a result, and you want it now. Why would you go through all the extra overhead and complexity of async?

In other words, yes there are implications: there is almost certainly going to be a performance hit; partly because the code will be more complex.

Sign up to request clarification or add additional context in comments.

1 Comment

since promises are part of the language and not a "on top" library or something similar, the runtime can decide to execute a promise immediately. there is not a performance hit in client computing rather than allowing your application to deliver steady 60 fps

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.