Re: [whatwg/dom] Improving ergonomics of events with Observable (#544)

The biggest thing I see missing from this proposal is an official way to use userland operators.  @benlesh, do you think `pipe` is ready to be included?

To the question about frameworks/libraries, as the author of a [userland implementation](https://github.com/material-motion/material-motion-js), there are three core types that I'm interested in:

- `Observable`
- `MemorylessSubject` - It's both an `Observer` and an `Observable`.  Calls to its `next` method are passed to all the observers who have `subscribe`d.  
- `Subject` - In addition to being both an `Observer` and and `Observable`, it remembers its most recent emission and calls new subscribers with it immediately.

If `Observable` is standardized without the `Subject`s, userland libraries will still ship them.  Still, any standardization is good for the whole ecosystem - it means operator authors know what interface they must implement to be interoperable with the ecosystem.  

Furthermore, if `Observable` is standardized, I expect it will become common knowledge among web authors (just like promises, generators, etc.)  That will make it easier for frameworks to depend on it without having to worry about intimidating their users with a steep learning curve - understanding observables becomes part of the job.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/544#issuecomment-351460076

Received on Wednesday, 13 December 2017 17:18:43 UTC