From: Victor Shepelev Date: 2006-03-28T22:56:14+09:00 Subject: Re: Array resizing David wrote: > > The question is more ideological than technical. Why not to have > > Array#resize in standard library? It seems not very rational. > > I think it might be because the size of an array isn't important if > the array just contains nils, because uninitialized values default to > nil anyway. And if you're adding non-nil elements to the array, then > the fact that the size changes is not really the main point; it's just > a side-effect of the operation, so referring to it as a "resize" > operation doesn't fit very well. Sounds reasonable. I can tell when I stumbled upon need for __resizing__ aray: when tried to use Array#transpose - it can't process [ [1,2,3], [1], [1,2,3,4] ] I think, it isn't sole case, when we can want having array of arbitrary size. > David Victor.