3 ms·
The pre-conditions are called Guard Clauses [0]. It's really useful to think about guard clauses and explicitly look for them to ensure the pre-conditions are m
by icc97 9y ago
The pre-conditions are called Guard Clauses [0]. It's really useful to think about guard clauses and explicitly look for them to ensure the pre-conditions are met rather than have them appear over time as if/else blocks.
edit: now that I've looked through the comments I see these are mentioned on numerous other threads.
[0]: https://en.wikipedia.org/wiki/Guard_%28computer_science%29 https://en.wikipedia.org/wiki/Guard_%28computer_science%29