Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Burned by precedence rules

by Zarchne (Novice)
on Dec 30, 2008 at 04:42 UTC ( [id://733173]=note: print w/replies, xml ) Need Help??


in reply to Burned by precedence rules

Joining with those who only use the English logical operators when then intend flow control, which follows what the perlop man page — “Operator Precedence and Associativity” — recommends, I suggest one also meditate on this:
&&= and ||= exist; and= and or= do not.

Replies are listed 'Best First'.
Re^2: Burned by precedence rules
by BrowserUk (Patriarch) on Dec 30, 2008 at 05:01 UTC
    I suggest one also meditate on this: &&= and ||= exist; and= and or= do not.

    S'funny, but that is exactly what makes them (and & or) so useful in boolean conditions.

    But you will not see that usefulness until you cease making an wholly artificial distinction beween "flow control" and whatever you consider to be "non-flow control".

    This: my $x = isSomething() and isSomethingElse() ? $p : $q;

    is just as much "flow control" as doSomthing() or doSomethingElse();

    as is: if( isSomething() and isSomethingElse() ) { ... } else { ... };


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      You highlighted "wholly artificial" as if it matters, as if a programming concept could be anything else? It's a funny argument to make.

        It's not the "programming concept" that matters. (Whatever that ethereal phrase may mean to you?)

        It is the wholly artificial distinction between "flow control" and whatever is the complement of that in this context?


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-03-28 18:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found