[272] in Coldmud discussion meeting

root meeting help first previous next next in chain last in chain last

dict_data()?

daemon@ATHENA.MIT.EDU (Thu May 19 17:47:45 1994 )

From: deforest@netcom.com (Robert de Forest)
To: coldstuff@MIT.EDU
Date: Thu, 19 May 1994 14:40:57 -0700 (PDT)

While this list is so active, what do people think of the idea of having a
 dict_data() builtin, parallel to the dict_keys builtin? I implemented this
 on FrozenApples (when it was up) in-db by doing

@program $dict.data
 arg dict;
 return $list.slice($dict.to_list(dict),2);
.

Or at least I think I did. This would turn dicts into a sort of super-list,
 since you could iterate on dict_data(dict), or whatever.

I don't know how this fits into the ColdMUD philosophy, and I know it's not
 a big issue, since I could just as easily keep a list for any dict that I
 wanted to know the data for and make sure the list was consistent at all
 times. This seems wasteful to me.

In case you think there is no use for this function, I used it in
 $user_db.users() when converting it to a child of my new $db generic.

Comments?
Crag / Robert de Forest