Branden wrote:
>
> Well, if it's not tie/overload, I didn't really understand why a vtable
> would have to be attached to a variable. I'd really like to see an example
> of variables whose vtables would have set_* and get_* different one from
> another, and another example of variables whose vtables would have
> add/subtract/mul/... different one from another.
>

Try to answer that myself:

    my @a : int;
    @a = (1, 2, 3);

@a would have set_* and get_* different from the same entries in the usual
array of scalars.

    @a = @b * @c

when @b and @c are matrixes instead of arrays, mul would be different from
the same entries in the usual array of scalars.


>
> What happens with vtables
> on assignment? (in $a = $b, $a copies its vtable from $b or not?)
>

Already answered, $a can change it's PMC by another one, and ties should be
done above that.

>
> And I really don't see why tie/overload couldn't be handled in a level
below
> the level of the opcodes (in a sense that one opcode calls various methods
> of a (potentially) tied/overloaded variable/value).
>

I think this still would be a good thing, at least in cases scalars are
considered (I'll still think a little about my @a : int...).

- Branden

Reply via email to