Timeline for The Singleton Pattern
Current License: CC BY-SA 2.5
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 17, 2011 at 13:23 | history | edited | red-dirt | CC BY-SA 2.5 |
Edit #2: From Herb Sutter on Singletons
|
| Jan 16, 2011 at 20:01 | history | edited | red-dirt | CC BY-SA 2.5 |
added 178 characters in body
|
| Jan 16, 2011 at 18:59 | comment | added | Loki Astari | It is bad because it tightly couples your code to the singelton/global. Tight coupling makes the code hard to update and very difficult to test. it also adds hidden dependencies into the code that are not obvious from the use of the code. | |
| Jan 16, 2011 at 18:47 | comment | added | Sergio | -1 - This doesn't explain WHY it's bad. Just says "it's bad". | |
| Jan 16, 2011 at 18:30 | comment | added | Darren Young | Aaah...I understand and yeah that would be pretty shitty. I've used it with fully encapsulated classes that I require only a single instance. I find by using the Singleton it's far easier to just use the instance reference rather than lots of new objects. | |
| Jan 16, 2011 at 18:27 | history | answered | red-dirt | CC BY-SA 2.5 |