3 ms·
> The advice that I really want to hammer into people's heads is, prefer “sad ifs.” I think this is the first time I've heard that name for this idea. You'll
by Izkata 3y ago
> The advice that I really want to hammer into people's heads is, prefer “sad ifs.”
I think this is the first time I've heard that name for this idea. You'll find more under the term "guard clauses" - it even has its own Wikipedia page: https://en.wikipedia.org/wiki/Guard_(computer_science) https://en.wikipedia.org/wiki/Guard_(computer_science)
- softfalcon 3y agoYeah, same, also know this as guard clauses. But "sad if's" is kind of adorable sounding, so I might start using it.