News for hackers. Stuff that matters.
Re:Promises are not neutral enough by lugg on Thursday February 15, 2018 @01:25PM (#16386288)
Post sounded like they picked up promises over the weekend and didn't like how it broke their C# mold.

Quite a few points didn't make any sense or simply showed misunderstanding around how and why promises are what they are.

> Eager, not lazy

Why does this even matter? It's an implementation detail that optimises for performance.

The outcome, eventual resolution, is all that really matters.

> No cancellation

These are not tasks, and covered elsewhere in the thread: I/O.

> Never synchronous

Its a promise, so that doesn't really make sense to complain about.

Alas it is solved with Async/await (which is just promises under the hood.)

> then() is a mix of map() and flatMap()

This one I can concede as it would be useful to have the option, or at least have them exposed.

I suspect then was simply kept because that's what bluebird or whatever it was at the time did.

Re:Promises are not neutral enough by lilactown on Thursday February 15, 2018 @05:29PM (#16388360)
The author is the original author of the streaming library xstream (similar in functionality to RxJS) and Cycle.js.

I believe he's thought a lot about this problem.