Chapter 3. The Promise Paradigm
In this chapter, we will focus on what the promises paradigm is, from where it originated, how languages implement it, and what problems it can solve for us.
We have briefly discussed the origin of the promise pattern in Chapter 1, Promises.js. In this chapter, we will explore this subject in more detail, in a generic way, so that it would clear the logic and theory behind the adoption of promise in different languages and in particular, how it's helping us in today's modern programming.
Callback, revisited
In previous chapters, you learned how the JavaScript mechanism works. The single-threaded model of JavaScript has its limitation, which can be controlled through better use of callbacks. However, the scenarios such ...
Get Mastering JavaScript Promises now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.