Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^5: if variants

by DrHyde (Prior)
on Oct 22, 2004 at 09:22 UTC ( #401420=note: print w/ replies, xml ) Need Help??

in reply to Re^4: if variants
in thread if variants

In English, saying "if this, do that, else do the other" makes sense and is easy for a person to parse. However "unless this, do that, else do the other" is much harder to parse because the "else" clause is a double negative (or even a triple negative if you have "unless not this"). Same applies to perl.

While you could, perhaps, argue that "if not this, do that, else do the other" is also a double negative, it's still easy to parse because it's familiar. We see it in every programming language ever.

Comment on Re^5: if variants
Replies are listed 'Best First'.
Re^6: if variants
by apotheon (Deacon) on Oct 23, 2004 at 09:34 UTC
    In short, then, it's a readability issue. Got it. Thanks.

    I think my facility for formal and symbolic logic systems probably makes it more difficult for me than for most people to recognize when some complex representation of a logical expression is difficult to parse by eye.

    - apotheon
    CopyWrite Chad Perrin

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://401420]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2015-11-27 21:05 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (732 votes), past polls