[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: exists $foo[7] and delete $foo[7]



>I don't understand how splice() got mixed up in all this.

>splice(), push(), pop(), shift(), unshift() affect the ordering of
>aggregate elements.

>delete() and exists() deal with existence of those elements.

>keys(), values() and each() are useful for enumerating them.

>Three different, orthogonal traits.

I really don't understand why there should be a difference then between
delete and undef.  And if there's no difference, delete shouldn't be there.

I can't believe we need hash interfaces to arrays via keys, values, and each.

    foreach $item (0 .. $#array)
or 
    foreach $item (keys @array)


    foreach $item (@array)
or 
    foreach $item (values @array)

If we don't want to make a difference between arrays and hashes, let's
just choose one of them and boot it from the language completely?  I 
nominate arrays for obsolescence.

--tom


Follow-Ups from:
Nick Ing-Simmons <nick@ing-simmons.net>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]