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.
>

Actually SV is a variable. That's a sv_setsv function that changes the value
of a SV. A thing that can change value is a variable, at least to me. Of
course, it's used as temporary variables also, in which case there's no name
for the variable in Perl, but it is a variable anyway...



> 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.
>
>

1. As I said before, a value shouldn't change its value, a variable does
that.
2. Array is not a value, at least not in Perl. Array references are, but
arrays themselves not. The same applies to hashes. And in my opinion, the
PDD talks about arrays and hashes (well, at least it talks about indexes and
keys). Arrays and hashes are actually collections of values, so as a scalar
is a `holder' for a value. Store and fetch methods should be in the variable
side, and operations on the value side.

Sorry if I can't make myself well understood...

- Branden

Reply via email to