January 2018

Back to the Futures: Making the Case for Algebraic Promises

Asynchronous programming in JavaScript has been on an exciting journey over the life of the language. We've always needed to avoid blocking UI to do computation, and various solutions have been explored over the years - events, callbacks, Observables, Promises... It's likely that you've encountered Promises if you've been writing any JavaScript in the last few years, and with native Promise implementations in NodeJS and all modern browsers, combined with the introduction of async/await in ES2017, they've never been more ubiquitous or useful. It may seem like a crazy time to be looking for alternatives when Promises have so clearly 'won' the async battle, but I think there is a lot to be learned from an older technique from functional programming. A technique that is lazy (we functional folk consider this a good thing), cancellable, and conforms to the monadic interface, opening up a world of interactions with other useful functional techniques. I think it's time to try Promise's algebraic cousin, the Future.

Mark Withers

Discover more featured events

Subscribe to our newsletter

No spam. Just simple and infrequent platform updates when something big happens.

© 2024 TechTalks.io Limited. All rights reserved.