4 ms·
write state machines inside objects to maintain state and process flow, and advising them to wrap callbacks into message sends to these process containers Any
by samstokes 16y ago
write state machines inside objects to maintain state and process flow, and advising them to wrap callbacks into message sends to these process containers
Any chance you could give an example of this refactoring / change of perspective (or link to a blog post, etc)? I can almost imagine what you mean, but it sounds like useful enough advice that I'd really like to grok it, and a concrete example would help a lot.
I'm currently working on another approach to reduce the complexity and error-proneness of evented programming. I'm working on a combinator library to abstract and automate the more common patterns of wiring up callbacks and propagating exceptions. Have you seen any success (or pitfalls) from this kind of approach?