Timeline for Are immutable/stateless singletons bad?
Current License: CC BY-SA 4.0
2 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 17, 2022 at 9:08 | comment | added | Robert Bräutigam | The key aspect of a singleton in the traditional sense, is that it is static and it is not passed in to another object. It is specifically these characteristics that people criticize. So if you take those out of your definition, I don't think you're talking about the thing most people do. I suspect people do not have a problem with a DatabaseConnection for which only one instance exist. The problem is if that instance is static and also referred to directly by others. Or did I misunderstand you? | |
| Oct 17, 2022 at 8:26 | history | answered | gnasher729 | CC BY-SA 4.0 |