From: Brian H. <bh...@sp...> - 2003-04-11 23:14:07
|
A first cut at resizeable arrays. Some comments: - I haven't made the reallocation strategy explicit. And I'm not sure I like the shrinking strategy. - I stole an idea from Perl, in that negative subscripts index from the end of the array- so get x (-1) always returns the last element of x, no matter how long x is. - No comments. Interface is either that for Array, or hopefully "obvious". Note that there are still a lot of functions to write: - set, insert, and append should have _list, _array, and _xarray variants which only realloc once - remove_range which only reallocs once - sub hasn't been written - Didn't write sort functions yet - map2? |