[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: exists $foo[7] and delete $foo[7]
Gurusamy Sarathy writes:
> >Simiarly, I think you should have a clear statement about what
> >`exists' actually does for arrays. Is exists($a[$n]) equivalent to
> >($n >= 0 ? $n <= $#a : -$n <= @a), or what?
>
> The effect of exists() on an array element cannot be represented using
> existing semantics, because the concept of "uninitialized array element"
> wasn't visible at the Perl level before. But the concept is crucial
> for representing "sparseness" in arrays, which is needed by pseudo-hashes.
Thanks. This is an important feature-depessimization wrt the older Perls.
Now a lot of new algos would suddently be possible...
Ilya
- References to:
-
Gurusamy Sarathy <gsar@ActiveState.com>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]