Skip to content

Commit 60cea91

Browse files
committed
Edited ch09.asciidoc with Atlas code editor
1 parent de72a33 commit 60cea91

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ch09.asciidoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1034,9 +1034,9 @@ The beauty of `async`/`await` lies in the fact that it fixes the biggest problem
10341034

10351035
While using `await` expressions optimizes toward reducing complexity in serial asynchronous code, it becomes hard to reason about concurrent asynchronous code flows when replacing promises with `async`/`await`. This can be mitigated by using `await Promise.all(tasks)` and firing those tasks concurrently before the `await` expression is reached. Given, however, that async functions don't optimize for this use case, reading this kind of code can be confusing, so this is something to look out for. If our code is highly concurrent, we might want to consider a callback-based approach.
10361036

1037-
Once again, this leads us to critical thinking. New language features aren't always necessarily better, for all use cases. While sticking to conventions is important so that our code remains consistent and we don't spend most of our time deciding on how to better represent a small portion of a program, it is also important to have a fine balance.
1037+
Once again, this leads us to critical thinking. New language features aren't always necessarily better for all use cases. While sticking to conventions is important so that our code remains consistent and we don't spend most of our time deciding on how to better represent a small portion of a program, it is also important to have a fine balance.
10381038

1039-
When we don't spend at least some of our time on figuring out what feature or flow style is the most appropriate for the code we're writing, we risk treating every problem as a nail because all we have is a hammer. Picking the right tool for the problem at hand is even more important than being a stickler for conventions and hard rules.
1039+
When we don't spend at least some of our time figuring out what feature or flow style is the most appropriate for the code we're writing, we risk treating every problem as a nail because all we have is a hammer. Picking the right tool for the problem at hand is even more important than being a stickler for conventions and hard rules.
10401040

10411041
=== Complexity Creep, Abstractions, and Conventions
10421042

0 commit comments

Comments
 (0)