[274] in Coldmud discussion meeting

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

Re: dict_data()?

daemon@ATHENA.MIT.EDU (Thu May 19 18:14:16 1994 )

From: stewarta@netcom.com (Alex Stewart)
To: deforest@netcom.com (Robert de Forest)
Date: Thu, 19 May 1994 15:05:10 -0700 (PDT)
Cc: coldstuff@MIT.EDU
Reply-To: coldstuff@MIT.EDU
In-Reply-To: <199405192140.OAA11563@netcom.com> from "Robert de Forest" at May 19, 94 02:40:57 pm

> 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);
> .

Actually, it seems to me that:

@program $dict.data
 arg dict;
 var x, list;
 list = [];
 for x in (dict)
   list = list + [x[2]];
 return list;
.

...would be much more efficient, but anyway:  While I can see that this might
be nice for some uses, I can't really come up with any operation off hand that
would use it frequently enough to be a real speed issue, and I'm not sure what
other reason there would be to make a builtin specifically for this purpose..

Maybe I'm just missing some incredibly obvious need for it or something, tho..

-Riche