[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: exists $foo[7] and delete $foo[7]
> Starting to fix some pesky artificial limitation in pseudo-hashes
> that I happened to bump into, I ended up having to hack in support
> for delete() and exists() on arrays. Comments welcome.
I notice that although the effect of deleting the last element of an
array is documented, you have not documented the behavior of delete on
any other element. You only said that it `deletes' the elemnt, which
could mean any of several things. In particular, you did not say
whether or not it is the same as `undef' in these cases. I think you
should explicitly say whether it is the same as undef or splice or
whatever.
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?
- Follow-Ups from:
-
Gurusamy Sarathy <gsar@ActiveState.com>
Gurusamy Sarathy <gsar@ActiveState.com>
- References to:
-
Gurusamy Sarathy <gsar@activestate.com>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]