Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Associative array ordering and selective unset (Re: Example function)



Typing away merrily, Bart Schaefer produced the immortal words:
> On Feb 1, 11:48am, Sven Wischnowsky wrote:
> } I was thinking about this... we could make the code keep a counter in
> } assoc arrays, increment it whenever a new key is added and store the
> } current value in the structure for this new element. Then we can treat 
> } the whole thing as being sorted by `time of addition'.
> } 
> } Hm, does this sound like the right thing?
> 
> Almost.  Something about it doesn't seem quite right to me, but I can't
> put my finger on what different behavior I'd expect.
> 
> I don't like the idea that every parameter table hash would end up with
> another integer of overhead in every entry, but maybe that's not so bad.

A pointer in each to embed a linked list?
-- 
--> Phil Pennock ; GAT d- s+:+ a23 C++(++++) UL++++/I+++/S+++/B++/H+$ P++@$
L+++ E-@ W(+) N>++ o !K w--- O>+ M V !PS PE Y+ PGP+ t-- 5++ X+ R !tv b++>+++
DI+ D+ G+ e+ h* r y?



Messages sorted by: Reverse Date, Date, Thread, Author