At 3:34 PM +0200 5/25/05, Leopold Toetsch wrote:
The OrderedHash PMC provides indexed access by a (string) key as
well as indexed access by insertion order. It's currently
implemented as an hash holding the index value into the data array.
The problem is of course deleting items (and adding items w/o string
key). The former is done by storing a new Undef item, the latter
just messes up the whole thing, IIRC.
Given the usage this is supposed to be for, that is:
E.g.:
- lexicals
- PMC/class types
- object attributes
- constant string table
- ...
I'd just pitch an exception if code deletes an entry or adds one with
no string key. Or if you're going to make it work maybe it'd be worth
renaming the current PMC class into something else and creating a new
class. (Assuming the changes would slow down or add complexity to the
current class, since we'd really like it fast and simple enough to be
reasonably auditable)
--
Dan
--------------------------------------it's like this-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk