Dan Sugalski writes:
: I'm not sure the vtable's the place for this sort of thing. (Plus then we
: start getting a zillion alternate functions--we'd have taint/notaint and
: thread/nothread right now for four, add another and that brings us to
: eight, then sixteen, then...) Besides, generally the code would want to
: check taint status before accessing the data.
Which penalizes every operation. I'd suggest vtable wrappers for
exceptional circumstances. Or at least do like Perl 5 and bunch
multiple things under one "think about it" test. But one of the
realizations of Perl 5 over Perl 4 was that we didn't need a separate
executable to keep tainting efficient if we just made it part of the
magic system. I'd hate to lose that in Perl 6. It'd be really nice if
ordinary data didn't have to interrogate any bits. If magic data
requires an indirection through whatever you're calling sv_any these
days, then you can keep magic magical without penalizing the mundane
data. I expect MI of magical methods could even be emulated by nested
SI vtables, as long as you keep them in the right order. Then you
don't get a combinatorial explosion of vtables.
'Course, if you nest sv_any pointers, you'd probably need a pointer in
the last one back to the first one, or you might lose track of the
PMC. That's why Perl 5 inverted the whole thing and ran the linked
list of magics out of the data area. But then you have to test bits
everywhere.
Tradeoffs, tradeoffs...
Larry