Proposal: use "One More Point" to handle async functions

Li Xiaolong 898310778 at outlook.com
Tue Sep 27 15:23:08 UTC 2016


Sorry I'm not familiar with es7. But I still thing my OMP is better than
async/await.

1: the await keyword can only be used in an async function, so each time you
want to await you have to add async before outer function.

2: async/await still use promise to handle async, which is not as clear as
my OMP that only use functions. The reject state of the promise became
redundant since await never gets it.

3: the async function calls identically with sync functions, makes it hard
to check out if the function is async without jumping to the definition. But
OMP can easily be recognized.

4: it's complex for async/await to handle deep async callbacks.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160927/a2e83f10/attachment.html>


More information about the es-discuss mailing list