News for hackers. Stuff that matters.
Re:Push ifs up and fors down by Izkata on Wednesday November 15, 2023 @11:18PM (#38285755)
> 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)

Re:Push ifs up and fors down by softfalcon on Thursday November 16, 2023 @12:24AM (#38286050)
Yeah, same, also know this as guard clauses. But "sad if's" is kind of adorable sounding, so I might start using it.
Re:Push ifs up and fors down by philbo on Thursday November 16, 2023 @01:10AM (#38286273)
pessimifs
Re:Push ifs up and fors down by 867-5309 on Thursday November 16, 2023 @02:57AM (#38286838)
depressifs?