At 2:32 PM -0700 8/1/02, Stephen Rawls wrote: >--- Sean O'Rourke <[EMAIL PROTECTED]> wrote: >> > Let me rephrase. How should the PerlArray pmc >> > handle negative indecis when the absolute value of >> > the index is greater than the size of the array. >> >> IMHO it would be most consistent with the way >> autovivification of positive indices works to extend >> the array to the left and set the first element, >e.g. >> >> @a = (1); >> @a[-3] = 2; >> # @a == (2, undef, 1) >> > >Hmmm. I hadn't even thought about expanding left and >shifting everything else right. I like your way, so >... if that's what everyone wants, I'll try my hand at >a patch.
No, I don't think this is appropriate. The PerlArray class implements Perl arrays, and should implement their semantics. -- Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk