4 ms·
> There is no perfect design pattern There I can certainly agree, but ... > An exe is a singleton, a file is a singleton. Most things in a computer are single
by yokaze 5y ago
> There is no perfect design pattern
There I can certainly agree, but ...
> An exe is a singleton, a file is a singleton. Most things in a computer are singletons.
I would say you are mistaking the instance for the class.
An individual exe/file/... are instances of the abstract concept file or executable.
What you are interacting with is usually an instance, not a class.
- 32gbsd 5y agoAnd a singleton is not an instance? Its all the same thing; 1 file, 1 instance. A file has properties, size, data memory, you can copy, paste it, delete it. A file has a type though generic.
- yokaze 5y ago> And a singleton is not an instance? No, a singleton is a pattern that ensures that there is at most a single instance of a class.