http://www.perlmonks.org?node_id=140542


in reply to (tye)Re4: mapcar -- map for more than one list
in thread mapcar -- map for more than one list

Suppose that you are trying to figure out what happened last night in a production run. Then no matter how clearly the intention read when you wrote it, the question that you are trying to answer is, "Did it do this?" Which usually looks like, "OK, I should have had X, Y, and Z, do I enter this block?" And in that situation, unless is an extra "no" from the question you are trying to figure out.

Even if I want to factor out a no, I will write it explicitly as an if. Seeing the no written explicitly simplifies a complex expression for me just enough to turn potential confusion into understanding.

I know it sounds silly, I know it sounds stupid. It did to me when I first heard this tip from another programmer. But after I was bitten a couple of times, I learned that it was true. On complex expressions, the implied not in unless is a nasty debugging trap waiting to happen.