3 ms·
> My impression was that it stalled out mostly because to make good use of Observables you need a pipeline library like RxJS or xstream anyway, As Ben Lesh exp
by azangru 4y ago
> My impression was that it stalled out mostly because to make good use of Observables you need a pipeline library like RxJS or xstream anyway,
As Ben Lesh explains, Observable is a primitive that is very powerful on its own. It can produce multiple values (in which it is similar to async iterables and different from promises); it has a mechanism for cancellation (as opposed to promises, and probably even async iterables); it probably can be both synchronous (if the data it produces finishes synchronously) and asynchronous; it is lazy, which makes it more composable than promises. Multiple values and cancellation are the big things I can remember.
Pipeline libraries (aka "operators") are downstream from that, and can be built in the userland.
- WorldMaker 4y agoIt just sounds like you agree with my full comment if you read the whole thing? I do know what Observables are. I personally do think they are a useful primitive even without the downstream pipeline libraries (though a good pipeline library is indispensable for getting good work done). My impression has been that TC-39 has had a harder time being convinced they are a primitive that should be codified at the language level, because they are today mostly wrapped in large user space libraries just fine and don't need direct syntax (such as the relationships between Iterables and Generators and Iterables and for/of; or the relationship between Promises and async/await). Even the DOM disconnect here where I personally would love to see the Primitive more actively used is not entirely TC-39's fault because DOM APIs are on "the other side of the fence" from TC-39 in the WHATWG and W3C working groups. I'd love to see the Observable proposal move further along. I realize it hasn't because my impression is that it isn't a priority from TC-39's perspective. Again, I personally disagree with that impression. It's just the impression I'm getting when I read through issues and comments on the proposal.