Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

From the FRP literature, an observable can be viewed as a stream of promises, something like:

    { "value" : ..., "next" : new Promise(...) }
So it's basically a linked list of the current value, and the next value which is a promise for the same type of structure.


An observable is definitely not a stream of promises, because an observable is push-based, while a stream of promises would be pull-based.

Big difference in performance, implementation and what operations are possible or not. Even if you add back-pressure in that protocol, it's still a big difference.

And yes, my point is that an observable is close to being a sort of superset of a promise, but not close enough.


> An observable is definitely not a stream of promises, because an observable is push-based, while a stream of promises would be pull-based.

Why would a stream of promises be pull-based? That seems like a pretty odd assumption to me.




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

Search: