From: Erik V. <eri...@hc...> - 2008-11-07 10:20:00
|
I consider a class "getInstance()" method to be a perfectly acceptable way to get access to the instance of a Singleton. Whether or not singletons are a good idea is a different discussion. In general I see no problems with it, except that in Rails we should get rid of most existing singletons if we want to aim for a multi-game server. However, I don't understand what you mean with "global variables" in this context. And I certainly don't see any connection between variables being global (or whatever) and the use of class getInstance methods. Puzzled, Erik. P.S. Thanks for finding and fixing the 1856 map display bug. Works fine for me. > -----Original Message----- > From: Mark Smith [mailto:mar...@gm...] > Sent: Friday 07 November 2008 01:04 > To: Development list for Rails: an 18xx game > Subject: Re: [Rails-devel] Starting on a client/server > > I can then agree with this change. > > What I feel would be beneficial is to find cases where you are running > 'getInstance' and determine if there is a better way to do this. I > feel the 'getInstance' routine is a bad idea in general, because it > allows for the effective globalization of variables. > > -------------------------------------------------------------- > ----------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > Build the coolest Linux based applications with Moblin SDK & > win great prizes > Grand prize is a trip for two to an Open Source event > anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |