3 ms·
So instead of spaghetti code (a tangled mess) it now is macaroni code (small pieces of code everywhere, with unclear execution flow)? :-) At least that's my ex
by wladimir 15y ago
So instead of spaghetti code (a tangled mess) it now is macaroni code (small pieces of code everywhere, with unclear execution flow)? :-)
At least that's my experience with structuring asynchronous event-driven programs (without coroutines).
- weixiyen 15y agopretty much but I find it quite readable and maintainable. The execution flow is very clear though if you look at the comments in my gist.
- n00kie 15y agoYes :) Still waiting for a proper execSync ( https://github.com/joyent/node/issues/1167 https://github.com/joyent/node/issues/1167 ). Without it small build/utility scripts turn into macaroni cheese unless you resort back to Python/Ruby/Bash - more languages, harder to maintain.
- tilgovi 15y agoI think this is coroutines under the hood?