in reply to Re^4: how to write a modified return() call?
in thread how to write a modified return() call?

I wasn't questioning his style, just the comments he made regarding the code I posted. He said he wondered if (1,2,3,4) could return (4,3,1,2)! He knows better than that.

Replies are listed 'Best First'.
Re^6: how to write a modified return() call?
by JavaFan (Canon) on Jul 14, 2009 at 15:58 UTC
    He said he wondered if (1,2,3,4) could return (4,3,1,2)!
    I never did.

    Just because a language allows itself the freedom to evaluate arguments to function or operators in any order it finds most efficient (which includes lazy evaluation, or parallelism), it doesn't such a language will turn A - B into B - A, just because it evaluated B before A.

    You know better than that.

      You know better than that.

      Yes, I know it doesn't generalize. I never said it did.

      (For those who don't know better, we're talking about operand evaluation order, which Perl doesn't document except for the comma operator.)


      You implied a readability problem. (It makes you wonder.) Previous discussions here have shown there's two kinds of unreadability. Unreadability from lack of knowledge, and unreadability from ambiguities and the like.

      There is no ambiguity in the code. It does exactly what one thinks it should do.

      That left being afraid of learning an operator you already use roughly every second line. I didn't mean to imply you were too dumb to learn it.