~/talk

Tug of War – Pushing and Pulling In JavaScript

Talkat revo.js 2023 · 2023-10-04..10-06· [javascript, reactive-programming]
name:Ben Lesh
github:benlesh
slides:none on file

Argues that almost every line of JavaScript is either a push or a pull and demonstrates with an M&M demo why pull is synchronous and push can cause back pressure. Classifies primitives: functions and iterables (pull), callbacks and observables (push), promises (eager hybrid), async iterable (pull→push via async function), and signals* (push→pull, dual of async iterable). Shows how to combine them for controlled delivery, cites RxJS and TC39/W3C work, and explains subscribe/unsubscribe, for‑of, and next/hasNext mechanics.

AI-written summary · about

  1. 0:00Introduction to push and pull
  2. 4:35Live demo of push vs pull
  3. 8:11Pull types in JavaScript
  4. 13:24Duality of iterables and observables
  5. 21:51Signals and their use cases
  6. 28:40When to use each pattern
  7. 32:35Key takeaways and conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.