3 ms·
No, you don't need to know the singleton's type. You can have several implementations of an interface, each of which is a singleton. Then you have a reference t
by mnw21cam 13y ago
No, you don't need to know the singleton's type. You can have several implementations of an interface, each of which is a singleton. Then you have a reference to the interface type, which allows different methods to be selected.
- masklinn 13y agoAh yes, the fabled multisingleton, because once you've dug your hole there's nothing better than filling it with raw sewage, and once you've got a singleton you can fill it up with half a dozen interfaces because reasons.