Hacker News new | ask | show | jobs
by algesten 3061 days ago
You mean this thread? https://github.com/promises-aplus/promises-spec/issues/94

I love reading the for-against monadic promises. It actually is educating just following the discussion.

1 comments

Yep, that's the one. I think it should be required reading.

Most of the folks in that thread are highly intelligent, and mean well. But to hear them toss out category theory as "impractical" and "not based in reality"?... It's just so cringeworthy. Here's their final spec, which seems absolutely convoluted to me: https://promisesaplus.com/#the-promise-resolution-procedure

Why does any of this matter to non-js devs (like me)? Because some of us want to target javascript with higher level languages, and externing a js promise instance is a necessity. The runtime-driven behavior described here means that the compiler will never really know the type of a given promise resolution. So, the compiler is very limited in what it can handle.