3 ms·
> Note that on the last time through the loop you are doing a wipe() that was not actually necessary to accomplish your cleaning goal, and thus wasting some pap
by aragonite 3y ago
> Note that on the last time through the loop you are doing a wipe() that was not actually necessary to accomplish your cleaning goal, and thus wasting some paper
True! Although I'd argue that's just part of the human condition. How do we check if any given condition obtains? Very often the simplest and most effective approach is just to perform some action which depends on that condition for its success, and we conclude from the fact that our action succeeded/failed that the condition does/doesn't obtain. How do we check if a closed door is locked? Technically we could use a see-through camera to observe the lock mechanism, but it's more straightforward to just try to push it open and see if we succeed/fail to do so. Ideally we may prefer structured decision-making like if-else and switch-case statements but in reality we tend to go for the quick and dirty (if less elegant, and sometimes wasteful) try-catches. :)