On Wed, Mar 28, 2001 at 04:36:58PM -0500, Dan Sugalski wrote:
> With perl, though, this does
> potentially unexpected things if $i is tied. Do we still optimize it away?
> Do we only do it if we can tell that $i's not tied?
Yep. And in non-trivial cases, the only way to do that might be for $i to
be :simple.
> Do we force the
> programmer to explicitly note which variables are potentially tied with the
> "my Dog $spot" syntax and assume that everything else is fair game?
I'd rather see that things that will never be tied or otherwise magic be
marked as :simple. Code always works, and will be faster with a little
effort.
> Can we
> even do that in the face of runtime requires, dos, or evals? (Or does that
> force a complete reevaluation of the optimized bytecode)
It is a catchable error to remove a behavorial restrictor attribute such as
:simple or :stateless. So let it be spoken, so let it be done.
This isn't any more preverse then the "you can't assign to constants" rule.
-=- James Mastros
--
The most beautiful thing we can experience is the mysterious. It is the
source of all true art and science. He to whom this emotion is a stranger,
who can no longer pause to wonder and stand wrapt in awe, is as good as dead.
-=- Albert Einstein
AIM: theorbtwo homepage: http://www.rtweb.net/theorb/