3 ms·
The #allInstances method would be a gift in many languages for debugging purposes.
by hboon 8y ago
The #allInstances method would be a gift in many languages for debugging purposes.
- dmux 8y agoWould a factory be able to achieve this? Keep a reference to everything it had constructed?
- hboon 8y agoFor your own classes/types and factory for every other class that you can in “client” code, yes. But harder or impossible with most languages for builtin types that you don’t instantiate directly.