
JavaScript’s Promise Rejected Its Namesake
JavaScript promises aren’t actually the promises they were named after. The concept of a promise originated from distributed computation as a linguistic solution to a complex problem. Barbara Liskov needed a better way to work with RPC and call streams, and the promise was the answer. In the original proposal of the promise, these key tenets emerged. Strong types : the result and failure modes of a promise are strongly typed. Multiple Claims : the result of a promise could be claimed any number of times. Blocking : When a promise is claimed, the process blocks until the value is available. Through a long series of events, we find JavaScript with a different promise. What was originally a solution for distributed systems became a means to handle asynchronous workloads with callbacks. Now this piqued my interest. How divergent are these views of promises? To validate this, I attempted to recreate some of the examples from Barbara’s paper in JavaScript. The result was painful. Recreating
Continue reading on Dev.to JavaScript
Opens in a new tab


