[1583] 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 (Tue May 30 01:14:48 2000 )

From: "Steven J. Owens" <puff@netcom.com>
To: coldstuff@cold.org
Date: Mon, 29 May 2000 22:03:31 -0700 (PDT)
In-Reply-To: <392EF982.A3390AC3@cubik.org> from "Bruce" at May 26, 2000 03:24:02 PM
Reply-To: coldstuff@cold.org


Andy Croft asks:
> > 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>

Bruce writes: 
> 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.

     Just out of curiosity, what's wrong with an endless
create/destroy cycle?  

     I'm mostly a spectator on the cold list, but this general topic
gets discussed a lot in Java circles, because object instantiation is
so expensive in Java.  The general tone, though, is that creating and
destroying would be a more elegant design, if not for the limitations
of the language environment.

     So is your preference environment motivated or design motivated,
and in either case, could you shed a little more light on the "why" of
the topic?
 
Steven J. Owens
puff@netcom.com