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


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

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Re: 'xor' operator is not a sibling to 'or' and 'and'?

Replies are listed 'Best First'.
Re^2: 'xor' operator is not a sibling to 'or' and 'and'?
by GrandFather (Saint) on Dec 19, 2019 at 04:48 UTC

    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

      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.

Re^2: 'xor' operator is not a sibling to 'or' and 'and'?
by Your Mother (Archbishop) on Dec 19, 2019 at 03:16 UTC

    No one who knows what golf is does it in production code and the single-letter-variable-name crowd straight outta C-ton has no idea what you’re talking about. “Clarity” in quotes from someone whose Perl is atrocious is just risible and like all LCD boosterism is more about catering to the worst than coaching to the best. You’ve been posting frequently the last couple days… what on God’s green Earth do you get out of it? Especially “anonymously.”