in reply to Re: Regex Or Die!
in thread Regex Or Die!

I, personally, would rather avoid using unless. It's a bit of a mind-twist as I grew up with C. Essentially it is
if ( ! condition )
and, for me, it is often simpler to explicitly present the not.

In fact the very posting of this question obviates the fact that unless isn't straightforward to understand for some users.

Although I accept there are rare occasions when unless might make sense it is a keyword that is best avoided when aiming for maximal maintainability.

Replies are listed 'Best First'.
Re^3: Regex Or Die!
by friedo (Prior) on Sep 27, 2006 at 13:25 UTC

    Oh, I agree that some people find it unclear, and that's fine. Personally, I prefer unless to if-not.

    I was just objecting to the dogmatic interpretation of PBP, which seems to be antithetical to the book's point.