Dan Sugalski wrote:
> At 03:53 PM 2/6/2001 +0000, David Mitchell wrote:
> > > 2. Perl 5 doesn't separate well a `variable' from a `value', and this
> > should
> > > be done to achieve a more clear design.
> >
> >Perl5 does in fact make a clear separation. 'values' are SV structures
> >(and AVs and HVs etc). Variables are names in stashes, PADs etc
> >that have a pointer to an SV or whatever.
> >
> >I think you may have mis-understood the emphasis of the vtable PDD doc -
> >it discusses how to store *values*, and says nothing whatsoever about
> >variables.
>
> This is important. (And a point I missed reading through the alternate
> vtable proposal) I don't care a bit about names, scratchpads, references,
> or whatnot at this level. This is pure "I have a PMC, what can I do with
> it?" stuff.
>
> Dealing with names and scratchpads and real perl variables is important,
> but covered elsewhere. (The compiler takes care of lexicals, FWIW, and
> we'll probably be treating the stash as a hash the way it is now for
globals)


Now I understand you!!! What I am calling a variable and what you are
calling a variable are different things. You are calling a variable what is
called a variable inside of perl, such as $x or @y. What I'm calling a
variable is a storage space for a value, something I can set the value. This
is exactly SV* in Perl 5, with its sv_setsv function. Of course, SV* can be
used for _perl_variables_, scratchpads, references, ... . But as in all
these cases it has the property of being able to change its value, it's a
variable.

The name->PMC translation really has nothing to do with this subject. It's a
thing with the compiler...

- Branden

Reply via email to