Web Directions

Conffab

  • Speakers
  • Presentations
  • Conferences
  • Topics
  • Pricing & Plans
  • Browse
  • Signup
  • Sign In
  • Speakers
  • Presentations
  • Conferences
  • Topics
  • Pricing & Plans
  • Browse
  • Signup
  • Sign In
Advanced Search
Searching videos

Async and Await

James Hunter at Code 2015
Sign up for a free membership to watch this and hundreds of other videos
  • Details
  • References
  • Keypoints

A deep exploration of proposed es2016 (AKA ES7) async functions, their inner workings (generators, promises, iterables), and how they will make our systems easier to write and maintain.

http://slides.com/jameshunter/deck-4/

Warning to functional programmers: this talk is all about side effects. Sorry!

Talking about code styles as personified friends… pretty funny 😉

But why does async have to be so hard? Why can’t we write nice simple async code?

Well you can, eg. With libraries like bluebird to set up coroutines.

But then… what is this black magic? IT’S A HACK!

Three main points….

  1. iterators (control the rate data is returned)
  2. generators
  3. generators again! They have an advanced mode where you can feed values back in as well as get values out

ES2016 brings in async and await to make things much clearer and easier to write (and understand).

function  steve (x) {
const  y = inc()
return  x + y
}

vs.

async  function superSteve (x) {
const  y = await inc()
return  x + y
}

(Lots of code examples, easier to look up slides!)

 

 

You may also be interested in

    Thumbnail for The Power of the Network

    The Power of the Network

    Thumbnail for World-class frontend engineering at scale

    World-class frontend engineering at scale

    Thumbnail for Operationalising Research – How ResearchOps can help

    Operationalising Research – How ResearchOps can help

    Thumbnail for The art of mindfulness in product design

    The art of mindfulness in product design

    Thumbnail for Magical UX and the Internet of Things

    Magical UX and the Internet of Things

    Thumbnail for WebXR: Virtual and Augmented Reality on the Web

    WebXR: Virtual and Augmented Reality on the Web

    Thumbnail for The Latest on Measuring Web Performance

    The Latest on Measuring Web Performance

    Thumbnail for Beyond Helvetica – Everything You Always Wanted to Know About Fonts* But Were Too Afraid to Ask

    Beyond Helvetica – Everything You Always Wanted to Know About Fonts* But Were Too Afraid to Ask

More presentations from Code 2015

    Thumbnail for Getting Offline with the Service Worker

    Getting Offline with the Service Worker

    Thumbnail for What Does HTTP/2 Mean for Front End Engineers?

    What Does HTTP/2 Mean for Front End Engineers?

    Thumbnail for Classing up ES6

    Classing up ES6

    Thumbnail for What Comes Next for the Web Platform?

    What Comes Next for the Web Platform?

    Thumbnail for Dawn of the Progressive Single Page App

    Dawn of the Progressive Single Page App

    Thumbnail for The State of the Animation

    The State of the Animation

    Thumbnail for Current Best Practice in Front End Ops

    Current Best Practice in Front End Ops

    Thumbnail for Stop the Fanaticism – Using the Right Tools for the Job

    Stop the Fanaticism – Using the Right Tools for the Job

Conffab
  • About
  • Speakers
  • Presentations
  • Conferences
  • Contact
  • Sign in
Sign Up

© Conffab 2023