Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Back to the future of JS

Back to the future of JS

Slides form JSConf EU talk.

Willian Martins

June 02, 2018
Tweet

More Decks by Willian Martins

Other Decks in Technology

Transcript

  1. @wmsbill this in the global scope Browser - window Web

    worker - self NodeJS - module.exports
  2. @wmsbill How to make this predictable? Reasoning the value of

    this is tricky Function.prototype.bind Arrow function () => {}
  3. @wmsbill Pipeline operator |> It is a syntax sugar for

    function composition It creates a way to streamline a chain of functions
  4. @wmsbill Smart pipeline Two types bare style and topic style

    () or [] are disallowed in bare style When () or [] is needed, topic style is used # token is subject to change
  5. @wmsbill F# pipeline proposal Extends the minimal proposal with an

    await step Await step waits for the resolution of the previous step
  6. @wmsbill What about currying? We can achieve partial application with

    curry Curry ≠ Partial application Curry returns arity n-1
  7. @wmsbill Partial application proposal Creates two new parameters tokens ?

    For single argument . . . for multiple parameters
  8. @wmsbill The . . . token Spread the unbound parameters

    Useful when you want to bound first or last parameter
  9. @wmsbill Should I use all of it in production? These

    proposal are in very early stage The adoption of one, may change the syntax/semantics of other Not production ready (yet)