http://qs321.pair.com?node_id=11110375


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 (Parson) 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.