4 ms·
love how xstate makes implicit state machines explicit with a time tested (one might say Lindy) format. badly/ad hoc defined state machines are the source of so
by swyx 4y ago
love how xstate makes implicit state machines explicit with a time tested (one might say Lindy) format. badly/ad hoc defined state machines are the source of so many bugs - David has been banging this particular drum the entire time i've known him (https://www.youtube.com/watch?v=HPoC-k7Rxwo&list=PLRvKvw42Rc7O0eWo2m_guXdZsGTEQM_jj&index=6&t=81s https://www.youtube.com/watch?v=HPoC-k7Rxwo&list=PLRvKvw42Rc...)
- a4isms 4y ago“Any sufficiently complicated model class contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of a state machine.” –a former colleague
- baq 4y ago“I don’t need a state machine library” - everyone when starting a new project
- xavdid 4y agoI came across this code from 2-years-ago-me today: {/* the fact that i'm doing this means I probably should have used x-state or something */} {stages.filter(Boolean).length > 1 && ( <div> WARNING! More than one assumption is true! {JSON.stringify(stages)} </div> )} One day I'll learn...
- vaughan 4y agoI wonder if we could build better implicit state machines if we could more easily visualize our imperative code by annotating it with visualization hints and parsing the AST. Also easier to debug/step-through this way.