Thank you for the clarification!
On Mon, Oct 1, 2018, 05:54 Brad Gilbert wrote:
> The [+] works because of an optimization.
>
> If you use the core &infix:<+> it instead calls the .sum() method.
>
> Since CArray has a sum method, that gets called instead.
> On Sun, Sep 30, 2018 at 4:28 AM Fernan
The [+] works because of an optimization.
If you use the core &infix:<+> it instead calls the .sum() method.
Since CArray has a sum method, that gets called instead.
On Sun, Sep 30, 2018 at 4:28 AM Fernando Santagata
wrote:
>
> Hi,
>
> I was hunting for a bug in my code, this one:
>
> my @a := C
El dom., 30 sept. 2018 a las 15:54, Fernando Santagata (<
nando.santag...@gmail.com>) escribió:
> What I was pointing out is that the '*' operator outputs an error, and I
> was expecting that, while the '+' doesn't.
> Besides, the '+' delivers the correct result, which apparently indicates
> that
Might be because there's a prefix form of + with a wider type? "Every DWIM
has a WAT"
On Sun, Sep 30, 2018 at 9:55 AM Fernando Santagata <
nando.santag...@gmail.com> wrote:
> What I was pointing out is that the '*' operator outputs an error, and I
> was expecting that, while the '+' doesn't.
> Be
What I was pointing out is that the '*' operator outputs an error, and I
was expecting that, while the '+' doesn't.
Besides, the '+' delivers the correct result, which apparently indicates
that the two operators are treated differently.
I was trying to understand whether this behavior is inherent
This works:
my int32 $a = 3; my int32 $b = 7; say $a * $b # OUTPUT: «21»
El dom., 30 sept. 2018 a las 11:28, Fernando Santagata (<
nando.santag...@gmail.com>) escribió:
> Hi,
>
> I was hunting for a bug in my code, this one:
>
> my @a := CArray[int32].new: 6,3;
> say [+] @a; # it should be "say
Hi,
I was hunting for a bug in my code, this one:
my @a := CArray[int32].new: 6,3;
say [+] @a; # it should be "say [+] @a.list;"
That statement prints "9", while changing the '+' with a '*' it generates
an error, as it should:
Cannot resolve caller Numeric(NativeCall::Types::CArray[int32]: ); n