3 ms·
If you expect a lot of callback it makes more sense to design that functionality as an object rather than as a single function. That way you can spread callback
by MatthewPhillips 15y ago
If you expect a lot of callback it makes more sense to design that functionality as an object rather than as a single function. That way you can spread callbacks over many functionality and still maintain modularity.
- crazygringo 15y agoNot necessarily -- the issue is not so much code modularity as much as control-flow issues, which separating out functions (mandatory) doesn't necessarily help with (because of all the flags of what function should call what other function afterwards, etc.).