Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Code cleanup branch
08-06-2006, 07:45 PM,
#26
 
Quote:Unlike globals, you can know and control exactly when the data is created.

How is this useful for a class that is expected by the coder to always be present? I understand what you're saying, and you're right, it's technically an advantage, but in the context of this game how would it be an advantage?

Quote:you can catch any exceptions that may be thrown during construction

How is this useful unless you're doing a lot of serious loading within the constructor (bad style)? You should always have a separate Load() function if you're going to be doing something that relies on external data -- not in the constructor! If it's not obvious why, I can elaborate. Again, I understand that it's technically an advantage, but in the context of this game I don't think it'd ever be useful.

Quote:3) they use static data

My point there was just that IF someone wants to use singletons simply because they don't have the stigma of globals, then they'd be deceiving themselves, because singletons use statics, and statics are in fact globals.

Based on the two advantages above, which I seriously doubt would ever be used in this game, they're not even worth the minimal extra typing that would be required to use them -- not to mention the time spent implementing them.

If you (or thelusiv) want to spend that time to get everything working with singletons in the code-cleanup branch, I'm willing to take a second look at their merits for use in this project. Until then, though, I'm sticking to my guns.
Reply


Messages In This Thread
Code cleanup branch - by thelusiv - 08-01-2006, 01:46 AM
[No subject] - by FFuser - 08-01-2006, 05:34 AM
[No subject] - by joevenzon_phpbb2_import3 - 08-01-2006, 08:28 PM
[No subject] - by thelusiv - 08-01-2006, 08:39 PM
[No subject] - by alex25 - 08-01-2006, 11:38 PM
[No subject] - by thelusiv - 08-03-2006, 12:31 AM
[No subject] - by joevenzon_phpbb2_import3 - 08-03-2006, 10:28 PM
[No subject] - by thelusiv - 08-03-2006, 10:33 PM
[No subject] - by thelusiv - 08-03-2006, 10:33 PM
[No subject] - by matthew_i - 08-04-2006, 01:20 AM
[No subject] - by matthew_i - 08-04-2006, 01:20 AM
[No subject] - by thelusiv - 08-04-2006, 01:38 AM
[No subject] - by thelusiv - 08-04-2006, 01:38 AM
[No subject] - by matthew_i - 08-04-2006, 01:41 AM
[No subject] - by matthew_i - 08-04-2006, 01:41 AM
[No subject] - by thelusiv - 08-04-2006, 01:53 AM
[No subject] - by thelusiv - 08-04-2006, 01:53 AM
[No subject] - by matthew_i - 08-04-2006, 01:58 AM
[No subject] - by matthew_i - 08-04-2006, 01:58 AM
[No subject] - by thelusiv - 08-04-2006, 09:08 AM
[No subject] - by thelusiv - 08-04-2006, 09:08 AM
[No subject] - by joevenzon_phpbb2_import3 - 08-04-2006, 08:38 PM
[No subject] - by joevenzon_phpbb2_import3 - 08-04-2006, 08:38 PM
[No subject] - by matthew_i - 08-06-2006, 02:43 PM
[No subject] - by matthew_i - 08-06-2006, 02:43 PM
[No subject] - by joevenzon_phpbb2_import3 - 08-06-2006, 07:45 PM
[No subject] - by joevenzon_phpbb2_import3 - 08-06-2006, 07:45 PM
[No subject] - by matthew_i - 08-06-2006, 11:25 PM
[No subject] - by matthew_i - 08-06-2006, 11:25 PM
[No subject] - by joevenzon_phpbb2_import3 - 08-07-2006, 09:26 AM
[No subject] - by joevenzon_phpbb2_import3 - 08-07-2006, 09:26 AM
[No subject] - by thelusiv - 08-07-2006, 04:43 PM
[No subject] - by thelusiv - 08-07-2006, 04:43 PM
[No subject] - by clytle374 - 08-07-2006, 04:51 PM
[No subject] - by clytle374 - 08-07-2006, 04:51 PM
[No subject] - by thelusiv - 08-07-2006, 06:25 PM
[No subject] - by thelusiv - 08-07-2006, 06:25 PM
[No subject] - by clytle374 - 08-08-2006, 12:47 AM
[No subject] - by clytle374 - 08-08-2006, 12:47 AM
[No subject] - by thelusiv - 08-08-2006, 09:05 AM
[No subject] - by thelusiv - 08-08-2006, 09:05 AM
[No subject] - by clytle374 - 08-08-2006, 07:19 PM
[No subject] - by clytle374 - 08-08-2006, 07:19 PM

Forum Jump:


Users browsing this thread: 24 Guest(s)