I noticed there was a bit of discussion going on about the singleton design pattern over at gamedev.net--
gamedev.net/community/forums/m…n=259115&reply_id=2017514
Namely that it should be avoided almost all of the time..
Reading the strong anti-singleton views, I was quite concerned with coding practices, the GCC code (since it uses a few different globalsl) and what I should change in my code.
The problem is that I can't really think of a good design which avoids using a global for access to code like the resource manager and logger. I haven't seen any sort of design that doesn't use any globals like this, either.
Perhaps it is like one person said: "Perfect_Coding_Never_Ending_Engine vs. Game_Complete"
Is the complete avoidance of singletons a little too caught up with perfect design- making it impractical- or is it worth it?
Is this something to be concerned about?
[SIZE=1]Edit: clarity[/SIZE]
gamedev.net/community/forums/m…n=259115&reply_id=2017514
Namely that it should be avoided almost all of the time..
Reading the strong anti-singleton views, I was quite concerned with coding practices, the GCC code (since it uses a few different globalsl) and what I should change in my code.
The problem is that I can't really think of a good design which avoids using a global for access to code like the resource manager and logger. I haven't seen any sort of design that doesn't use any globals like this, either.
Perhaps it is like one person said: "Perfect_Coding_Never_Ending_Engine vs. Game_Complete"
Is the complete avoidance of singletons a little too caught up with perfect design- making it impractical- or is it worth it?
Is this something to be concerned about?
[SIZE=1]Edit: clarity[/SIZE]
The post was edited 2 times, last by vox.nihili ().