Re:Why Python uses 0-based indexing. It's because of slices
by philh on Wednesday October 23, 2013 @06:48PM
(#6602283)
Perl lets you choose whatever index you like for the first element, including negative ones.
[ Parent
| on HN ]
Re:Why Python uses 0-based indexing. It's because of slices
by marcosdumay on Wednesday October 23, 2013 @08:40PM
(#6602753)
That's because Perl does not have arrays. You've been using hashes.
In practice, Perl is not expected to be fast, so I don't think there's any difference.
Re:Why Python uses 0-based indexing. It's because of slices
by neild on Wednesday October 23, 2013 @09:04PM
(#6602823)
This is not correct. Perl has arrays and, as the person you are replying to said, allows the index of the first array element to be changed globally by setting a special variable. $[, if I recall correctly.