Chaim Frenkel wrote:
> We may not even need to copy the body.
The nice thing about the "copy body and replace with stub" solution
is that it doesn't impose any costs on threaded subs that don't get
re-bound at run-time. I agree with you that there are lots of
solutions though so re-binding shouldn't be an issue regardless of
what kind of VM is used.
Anybody know why Forth doesn't use one of these solutions?
BTW, Perl 5 already "suffers" from this problem for const subs --
they can't be re-bound at run-time. Maybe a pragma could be used to
enable/disable the ability to re-bind subs. The default could
depend on whether symbol table frobbing or eval has been seen by
the compiler. (We already do that kind of stuff with $` etc.)
> (Hmm, with Q::S, it could be all of them in constant time.)
Would a Quantum::Tunneling module use zero energy? Would be cool to
have on a palmtop.
- Ken