Dan Sugalski wrote:
>
> >2. Making the implementation of `tie' and `overload' more efficient
('cause
> >it's very slow in Perl 5).
>
> No, not at all. This isn't really a consideration as such. (The vtable
> functions as desinged are inadequate for most overloading, for example)
>


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. What happens with vtables
on assignment? (in $a = $b, $a copies its vtable from $b or not?)

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).

The example of `my @a :int' really shows your point. I was actually thinking
current Perl5 syntax as a target, and I really wouldn't know how to deal
with this... (but sure I'll think about it!)

- Branden

Reply via email to