[EMAIL PROTECTED] wrote:
I disagree. You end up with a situation where some
@a * @b;
are in scalar context, some not.
No, everything would be in a scalar context. If you used tie() to
specially tie a variable, then you might be able to overload +, *, -,
etc, but this is no different
Nathan Torkington wrote:
Actually, the only refinement I'd like to see is that boolean operators
(==, , ||) be excepted from the distributive rule.
This is to permit:
if (@a == @b) # shallow comparison
and
@a = @b || @c;# @a=@b or @a=@c; # ish
Yeah, I
Nathan Torkington wrote:
Jeremy Howard writes:
No, there's no arbitrary decision. *Every* operator is component wise on
lists. It is internally consistent, and consistent with most other
languages
that provide array/list operators. It's easy to get stuck on the '*'
example, because
"NT" == Nathan Torkington [EMAIL PROTECTED] writes:
NT Actually, the only refinement I'd like to see is that boolean operators
NT (==, , ||) be excepted from the distributive rule.
NT This is to permit:
NT if (@a == @b) # shallow comparison
NT and
NT @a = @b || @c;#
Nathan Wiger wrote:
what people would want to use the ops for, and it's also more usable to
us non-PDLers.
I'd like to suggest that it is not a very good idea to start dividing
the world into PDLers and non-PDLers. There are a multitude of reasons
but I am not keen to go into details.
Nathan Wiger wrote:
This RFC proposes that operators in a list context should be applied
element-wise to the elements of their arguments:
@d = @b * @c; # Returns (2,8,18)
If the lists are not of equal length, an error is raised.
I've been watching this RFC for a while. I
[EMAIL PROTECTED]
Nathan Wiger wrote:
This RFC proposes that operators in a list context should be applied
element-wise to the elements of their arguments:
@d = @b * @c; # Returns (2,8,18)
If the lists are not of equal length, an error is raised.
I've been watching