On Fri, 12 Jul 2002, Sean O'Rourke wrote:

> # New Ticket Created by  "Sean O'Rourke"
> # Please include the string:  [netlabs #801]
> # in the subject line of all future correspondence about this issue.
> # <URL: http://bugs6.perl.org/rt2/Ticket/Display.html?id=801 >
>
>
> This patch makes the following behave as it does in Perl 5:
>
> @a = 1..3; @b = 1..3;
> $x = @a + @b;         # x is 6 in Perl 5, undef in Parrot
>
> The problem was that the math vtable methods were giving up if the other
> side of the operator wasn't an int or a num.  So the current version of
> PerlArray would make $x undef.  I'm not sure getting the other thing's
> int value (as opposed to its num value) is the right thing, but it seems
> like a reasonable guess.

Something tells me this approach isn't quite right but I don't know what.
It seems odd that, for instance, @a decides what context to take @b in.
How do we say 'scalar context' in Parrot?  What if @b is "Blah" in scalar
context?  Does it return 0 then?

Anyone with more powerful Jedi skills want to bless this patch?

- D

<[EMAIL PROTECTED]>

Reply via email to