Forum OpenACS Q&A: Response to need some brilliant curmudgeons.

Collapse
Posted by Tom Jackson on

The same discussion came up today in the AOLserver chat. You need to be able to handle duplicate keys in the order you find them. Database queries could return duplicate column names as well. If you are trying to come up with something useful, don't try to engineer a new structure for everyone to learn.

In reviewing the API today, I did notice one item I didn't really like. You can easily verify that you have more than one key with the same name. Getting the second one seems to require you to delete the first, if you try to access the key by name. Stepping through by index still gives you all the key/value pairs. It would be nice if you could specify a start index for your search for the next matching key. Other than this one problem, I think it will be difficult to improve the structure and function of an ns_set.