in reply to Re^10: Operator overloading with returning lists?
in thread Operator overloading with returning lists?

Well, yes, but that's because what's inside the parens is an operand of an operator whose result is an argument to the function. It's not any different from:
some_sub(EXPR1 + EXPR2)
EXPR1 is evaluated before some_sub is called. And since perl5 doesn't have lazy evaluation, and unlike to get it any time soon, it's going to stay like this for a while.

But that has little to do with precedence (or at least not with the precedence people talk about when talking about operator precedence); the only 'rule' that's in effect is that arguments (and parameters) are evaluated before the operators/subs themselves.

Replies are listed 'Best First'.
Re^12: Operator overloading with returning lists?
by LanX (Saint) on Dec 01, 2008 at 16:58 UTC