[1582] in Coldmud discussion meeting

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

Re: A couple simple questions (hopefully)

daemon@ATHENA.MIT.EDU (Fri May 26 18:36:55 2000 )

Date: Fri, 26 May 2000 15:24:02 -0700
From: Bruce <bruce@puremagic.com>
To: coldstuff@cold.org
Reply-To: coldstuff@cold.org

Andy Croft wrote:

> Can Cold handle the creation and deletion of objects on a grand scale?

It can handle having millions of objects in the DB.  Such a system
already exists, using Cold.

>         To clarify, I'll have a $thing I've whipped up created every time a group
> of players enter combat that acts as a "referee". At the end of combat, the
> referee object is destroyed. Now, after a year of 10 to twenty players
> duking it out will Cold be able to handle it? Bear in mind I'm still new to
> a powerful OOP environment like Cold. Please save the diesel fuel and
> matches, I'm painfully aware of my incompetence with Cold. <GRIN>

Why not just create them as needed and when done with the match, return
them to a pool of un-managed referee objects?  That way, if you only
ever have 10 matches at once, you only really need to create 10 refereee
objects, rather than an endless cycle of create+destroy.

>         My second question deals with the dictionary data type. I understand how to
> use functions to reference, index, add, and delete items from a dictionary.
> My second (stupid) question is this:
> Can the value of a dictionary item be edited?

Dictionaries, like list, strings and other datatypes are immutable. 
This means that you can't directly edit them.

To change the value, you'd have to the same as you did to set it.

dict = dict.add('ehhh, 0);

 - Bruce