Hacker News new | past | comments | ask | show | jobs | submit login

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.




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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: