> SWM> If you actually compile a Perl program, like
>
> SWM> $a = $b
>
> SWM> and then look at the op tree, you won't find the symbol "$b", or "b"
> SWM> anywhere in it. The fetch() op does not have the name of the variable
> SWM> $b; rather, it holds a pointer to the value for $b.
>
> Where did you get this idea from? P5 currently does many lookups for
> names. All globals. Lexicals live elsewhere.
>From perlmod.pod, Symbol Tables:
the following have the same effect, though the first is more
efficient because it does the symbol table lookups at compile
time:
local *main::foo = *main::bar;
local $main::{foo} = $main::{bar};
Perhaps I misinterpreted it.
> You are imagining an implementation and then arguing against it.
Yes.
> Here is my current 'guess'.
[...]
> Now where
> sub recursive() { my $a :shared; ....; return recursive() }
> would put $a or even which $a is meant, is left as an excersize
My point is that we can't work with guesses and exercises.
We need a specific, detailed proposal that we can discuss and
evaluate. I'm hoping that someone will submit an RFC for one.
- SWM