3 ms·
At least with the while version I have complete control over the loop. With the async version I have to figure out what the timing model is by reading documenta
by anikom15 4y ago
At least with the while version I have complete control over the loop. With the async version I have to figure out what the timing model is by reading documentation and assume it’s accurate. Async can make things easier but it’s not going to magically make code more maintainable. It’s hard to debug async problems. With a loop I can debug it on a sheet of paper.
Choose abstractions and higher-order expressions when it makes sense to do so, not just to avoid low-level or ‘deprecated’ ones. I believe arithmetic ifs are higher-level than boolean ifs from the computer’s perspective, but you wouldn’t prefer that over a boolean if, would you?