4 ms·
I call them guard conditions and it’s my preferred pattern too. Deal with all the exceptional cases at the top and then move on to the happy path as a linear fl
by aidos 2y ago
I call them guard conditions and it’s my preferred pattern too. Deal with all the exceptional cases at the top and then move on to the happy path as a linear flow.
- hollerith 2y agoAnd at the start of the happy path, I tend to put "Do it" as a comment (a convention I learned from reading Emacs Lisp code).