in reply to Clever vs. Readable

Since only one of the three is actually correct, I'll pick that one.

Trying to be clever doesn't help.

Replies are listed 'Best First'.
Re^2: Clever vs. Readable
by Anonymous Monk on Aug 09, 2008 at 17:55 UTC
Re^2: Clever vs. Readable
by Anonymous Monk on Aug 09, 2008 at 17:53 UTC
    dems fightin' werds. pleez explain.
      <= is not documented to return 1 when true.

        But it always has, and does now. And given the adherence to the straight jacket of backwards compatibility that has erstwhile constrained perl development, do you really expect any Perl 5 implementation to change that, any time soon?


        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.

        Wow, I always thought perlop or perldata used to have some guarantee for this, but I can't find it now. I don't think any future perl would change this though.

      Two return a max result. I'll leave you to guess which one is correct.

      The ternary variant suggested elsewhere suffers somewhat from the same exposure to simple coding errors, especially if the value calculations are not trivial or the size of the set of values being tested is increased.


      Perl reduces RSI - it saves typing
        Two return a max result.
        Reely? I dont think so. got code?