21:51 | <bakkot> | proposal to add observables: https://twitter.com/domfarolino/status/1684921351004430336 |
21:51 | <bakkot> | specifically to add them to HTML, instead of JS |
21:51 | <bakkot> | for... reasons |
21:52 | <ljharb> | reasons that are unclear; i've recommended it be brought back to tc39 on the repo |
21:52 | <bakkot> | well, I mean |
21:53 | <bakkot> | the reason is almost certainly that he thinks it is not going to get through tc39 in any reasonable timeframe, and wants it in the platform, so he is routing around tc39 |
22:09 | <snek> | is there anything in the js spec that would use observables |
22:10 | <snek> | we really need a more robust standard library |
22:10 | <snek> | i guess Atomics.waitAsync is the only thing that is ilke an "event" |
22:34 | <bakkot> | we really really need a more robust standard library yes |
23:04 | <TabAtkins> | Yeah, the "just do it in DOM" is almost certainly an "avoid the tc39 logjam which is extremely likely to result" thing. Plus as @snek said, DOM has a use-case immediately (event listeners), while JS itself doesn't. |
23:08 | <Kris Kowal> | My 2¢ is that ES already implies the shape of an Observable in the form of sync generator functions (dual to their use as iterators) and that we may as well make it official.
|
23:10 | <Kris Kowal> | Once @bakkot’s iterator helpers settle, there’ll be plenty of precedents on which to triangulate. |
23:18 | <bakkot> | (Michael Ficarra's and Yulia's iterator helpers, strictly speaking; I just helped out) |
23:18 | <bakkot> | also iterator helpers have settled and are shipping in Chrome (unstable - stable on Sep 12) |
23:18 | <bakkot> | though we'll want to add some more stuff |
23:18 | <Rob Palmer> | Bradley suggests there may be a performance advantage of implementing this at a higher level. |
23:19 | <bakkot> | or at least I will |
23:19 | <bakkot> | (the observable proposal linked above does indeed draw on iterator helpers for its combinators) |
23:34 | <snek> |
|
23:35 | <Kris Kowal> | Those are in fact push methods if you look closely. |
23:35 | <snek> | oh i see |
23:35 | <snek> | lol |
23:37 | <Kris Kowal> | I wrote a thing about this about nine years ago. https://github.com/kriskowal/gtor |
23:37 | <snek> | oh you wrote that |
23:37 | <snek> | small world as always |
23:40 | <Kris Kowal> | I do intend to dust it off some day since async iterators actually exist now. |