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

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.

  • Comment on Re^6: how to write a modified return() call?

Replies are listed 'Best First'.
Re^7: how to write a modified return() call?
by ikegami (Patriarch) on Jul 14, 2009 at 16:24 UTC

    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.