Michael G Schwern wrote:
> If pop @array, -1 == shift @array, 1 and shift @array, -1 == pop
> @array, 1, and if both Ways To Do It are almost exactly the same, then
> there's no value to allowing negative numbers.  In most cases I'd
> expect passing a negative number to be a mistake on the programmer's
> part.
>
I'd like to see negative numbers work. Otherwise the programmer would have
to explicitly check whether an index into a string was positive or negative,
take the absolute value, and use pop() or shift() as appropriate.


Reply via email to