Dan Sugalski wrote:
> I think you're also overestimating the freakout factor.

Probably. I'm not really worried about surprising programmers
when they debug their code. Most of the time they've requested
the surprise and will at least have a tiny clue about what
happened.

I'm worried a little about building features with global effects.
Part of Perl 6 is elimination of action-at-a-distance, but now
we're building the swiss-army-knife-of-action-at-a-distance.

What worries me the most is that allowing %MY to change at run-time
slows down code that doesn't do it. Maybe we can figure out how
to reduce the impact, but that's time IMHO better spent making
existing code run faster.

You wrote on perl6-internals:

   get_lex P1, $x          # Find $x
   get_type I0, P1         # Get $x's type

   [ loop using P1 and I0 ]

That code isn't safe! If %MY is changed at run-time, the
type and location of $x will change. You really need to put
the code for finding $x *inside the loop*.

Maybe we can detect a few cases when it's safe to move
get_lex out of a loop, but if the loop calls any subs or
non-core ops we're stuck.

- Ken

Reply via email to