Hi, could you elaborate on 1. “Handwritten promise code?”, could you share an example?
-
-
-
Instead of… somePromise.then((value) = callback(value)); Do this (within an async function): const value = await somePromise; callback(value);
- 4 more replies
New conversation -
-
-
I wonder how many apps end up shipping promises due to minifiers not supporting async/await syntax
-
i wonder how many apps do not end up babelifying everything to ie11 version of the code. :(
- 8 more replies
New conversation -
-
-
How about async await in try catch? I’ve been wanting to ask that for awhile now
-
That doesn’t matter. The “code within a try-catch cannot be optimized” advice hasn’t been true since
@v8js v5.9 & Chrome 59, when we shipped TurboFan. - 1 more reply
New conversation -
-
-
The http server in the blog post has a memory leak in case of bad input. Can you please fix it? https://github.com/mcollina/make-promises-safe/blob/master/README.md#the-unhandledrejection-problem … for more details.
-
cc
@bmeurer @MayaLekova the same issue was also in your talk. - 1 more reply
New conversation -
-
-
I love you in so many different ways.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.
JavaScript performance advice:
1. prefer `async`/`await` over hand-written promise code
2. prefer native promises over userland implementations
Faster and easier-to-debug async functions and promises are coming to V8 v7.2 & Chrome 72!
@MayaLekova and