Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: 'xor' operator is not a sibling to 'or' and 'and'?

by GrandFather (Sage)
on Dec 19, 2019 at 04:48 UTC ( #11110375=note: print w/replies, xml ) Need Help??


in reply to Re: 'xor' operator is not a sibling to 'or' and 'and'?
in thread 'xor' operator is not a sibling to 'or' and 'and'?

What is this if {} then {} construct you speak of? It doesn't exist in any language I'm familiar with.

That aside, what is the point you are trying to make? As a general thing smaller is better for clarity so long as you are being sensible. Single letter and generic variable names are not sensible. Being too clever is generally not sensible. Applying rules always is often not sensible. Breaking the rules often is always not sensible. So, what is the sensible point you are trying to make?

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

Replies are listed 'Best First'.
Re^3: 'xor' operator is not a sibling to 'or' and 'and'?
by jcb (Vicar) on Dec 19, 2019 at 23:38 UTC

    An if {} then {} construct exists in Tcl, where then is an optional noise word, but Tcl has no equivalent to Perl's xor operator, so his comparison is still bogus. The Perl equivalent would be if () {} which is only seven characters (and Tcl accepts an equivalent if {} {} syntax) but it is still wrong because our questioner is talking about using xor as another type of fat comma in contexts where an actual comma or fat comma would cause perl's parser to extract an unintended meaning for the expression.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2020-11-30 02:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?