On Mon, Jan 27, 2003 at 11:00:17AM -0800, Michael Lazzaro wrote: > resize => (1024), # internal blocksize (in indexes) > # by which array expands? > resize => { $_ * 2 }, # or via closure, based on current size?
I think you're making too many assumptions about the internal implementations of arrays here. At least, I'm hoping that the innards will be flexible enough to let me do different things, such as request sparse arrays by default > locked => 1, # read-only, can't store new values There was a discussion on p5p about "restricted hashes", and what one might want. Even for arrays I can think of at least 2 levels. 1: everything locked - no new elements, existing elements treated as read only 2: size locked - you can't extend (or shrink) the array, but you can add/remove elements If array indexes have a concept of exists distinct from defined, then several more graduations appear. Nicholas Clark