I do not understand what is being proposed.
I have not used a language with async
/ await
before, and the proposal does not explain what they mean in a way that I can understand.
To me, “async” should mean that something is done asynchronously, and “await” should mean that execution is blocked while waiting for something asynchronous to complete.
But the proposal text says otherwise.
The proposal text explains that “async
” does not actually do anything asynchronous, as that is left to libraries like Dispatch
.
And it states that “await
does not block flow of execution”.
So if async
does not kick off an asynchronous operation, and await
does not block while waiting for it to complete, then I have no idea at all what they are supposed to do.
• • •
Furthermore, the proposal says that async
functions can only be called from other async
functions, which to me sounds like it defeats the purpose. The purpose of a keyword like async
, in my mind, should be exactly to mark the departure from synchronous code into asynchronous code.
But again, the proposal claims that async
is not actually asynchronous, so I really don’t comprehend its goal or purpose.
The proposal also says that regular programmers should never have to call beginAsync
at all, which makes no sense to me. Beginning asynchronous operations from synchronous ones seems like it should be the primary objective of a proposal in this space.
And I cannot even begin to fathom what suspendAsync
is for. The explanation and examples in the proposal do not enlighten me whatsoever. Its purpose is a complete mystery to me.
• • •
I have read the entire proposal from beginning to end, and I do not understand it.
The motivation section makes sense: I can understand that the pyramid-of-doom from nested callbacks is a problem worth addressing.
But I do not understand what async
/ await
are intended to do, and I do not understand how they might eliminate the pyramid of doom.
I would like to request that the proposal should include much more basic explanations, for people who have never seen async
/ await
before. To explain what those keywords are actually intended to do.