4 ms·
Node didn’t introduce the Promise API. Although it definitely instigated it. Node, with its async IO model, was just littered with callbacks. There were a zilli
by eyelidlessness 6y ago
Node didn’t introduce the Promise API. Although it definitely instigated it. Node, with its async IO model, was just littered with callbacks. There were a zillion different approaches to async APIs that could ease that. Promises were, well, the most promising. But years of iteration and competing standards came and went before Node adopted them as the preferred API. And they did so right along with browser vendors and web standardization bodies.
- rektide 6y agoI was referring to node <0.1.30[1] which did have promises for a while. largely from jQuery deferred, which were ungood in a couple ways I don't remember. but also remarkably similar. I still largely think kris kowal building the "Q" promise library is what made promises interesting, what surfaced the idea that we might want to first-class our completeablea/futures. I know kris had some specific inspirations but I forget what. pains me somewhat to this day that promises ultimately became somewhat un-value like, that handlers don't get to see what it was resolving. all the chain/spawn discussion, the functional promise folk: they got rolled by those insisting we had to target only the lowest rings of the developership, and that allowing more potent systems was unacceptable. wish I could find those es-discusa threads, for the powerful sorrow of the afteath, what we are stuck with, in it's so lites form, haunts me. especially as we double back a decade latter & invent controllers & signals toanage our promises. which we would have had for free. way off topic now. forgive me my late night ramblings. [1] https://github.com/nodejs/node-v0.x-archive/blob/v0.1.30/ChangeLog#L5 https://github.com/nodejs/node-v0.x-archive/blob/v0.1.30/Cha...