Hacker News new | ask | show | jobs
by Izkata 805 days ago
Promises proved themselves in libraries before they got added to Javascript.
2 comments

Signals have, too. And it is literally spelled out in the readme, in the introduction section
They did create a polyfill, but the readme says it was based on design input from other projects, not on aligning multiple existing designs. This at least sounds like the opposite of what happened with promises, where they already existed in multiple libraries before the Promises/A design came out.
> where they already existed in multiple libraries

Signals exist in multiple libraries with what are really minor variations on the theme.

> before the Promises/A design came out.

That's why the current proposal asks for input about design.

IIRC, promises also had multiple iterations on the design. There were calls to make them more monadic, less monadic, cancelable, non-cancelable etc.

And the original proposal looks nothing like the eventual API: https://groups.google.com/g/commonjs/c/6T9z75fohDk [1]

And new things are still being added to them (like Promise.withResolvers etc.)

[1] There's a great long presentation on the history of promises here: https://samsaccone.com/posts/history-of-promises.html

I hate promises. Writing:

let result; let error; await blah .then(r=>result=r) .catch(e=>error=3) .final(callback(err, result));

Is disgusting.