From: Mathieu Bouchard Date: 2000-10-25T14:56:29+09:00 Subject: [ruby-talk:5839] Re: Array#insert rehashed > 2) Do you think Array#insert(pos, stuff) should work almost like > current Array#[pos, 0] = stuff except it doesn't autoflat? > Or do you think negative pos too should be handled differently > from Array#[pos,len]= ? > After some concensus on these issues we can discuss about matju's add-ons > [ruby-talk:5768], which follow the same theme. Those were only for argumentative purposes, and are not suggestions. Don't even call them my add-ons. I ask about them because I think discussing them is relevant *now*, not in the future. My reasoning is: * Suppose I want to add #insert * then I want to add its counterpart #delete because they go together * But then, I can do any or both at once with #splice and it ends up being as fast or faster. * Because of #splice I do not need #insert nor #delete. * If I don't need to add those, then I should not add those. * #splice is mostly like #[]= except for the return value . . . (i'm not sure about #splice) matju