ASYNC / AWAIT

works with Promises 

first implementation: MultiLisp (~ 1980)

promise
eventual
delay
deferred
(future)

write asynchronous code

in synchronous fashion

why asynchronous?

because you don't want your 

page to be blocked by an XHR

which just shows the current weather 

YES, but we need to deal with it.

Can asynchronous code cause errors?

in the beginning, there where callbacks

then they became promises

which can easily be used with async & await

can I use async & await?

should I use async & await?

+ easier to think synchronously

+ easier with a low indentation level

+ no endless then chains

+ easier debugging

+ synchronous error handling (try/catch)

- need to learn a new syntax
- async/await from start to finish
- transpile overhead when supporting IE11

ASYNC / AWAIT

By Marc Dix

ASYNC / AWAIT

ASYNC / AWAIT lightning talk

  • 842