in reply to Re: Clever vs. Readable
in thread Clever vs. Readable

dems fightin' werds. pleez explain.

Replies are listed 'Best First'.
Re^3: Clever vs. Readable
by ikegami (Patriarch) on Aug 09, 2008 at 22:10 UTC
    <= 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.

        Clever code often relies on assumptions. Sooner or later, one will break.

        Even if they never break, the burden of veryfying assumptions has been added.

        Update: Overloaded ops break your claim of always and ever.

      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.

Re^3: Clever vs. Readable
by GrandFather (Saint) on Aug 09, 2008 at 20:54 UTC

    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?