40 ms·
I wish having to debug this onto the person who downvoted my comment without adding to the discussion. This is worse than singletons that - in all their glorio
by jupp0r 3y ago
I wish having to debug this onto the person who downvoted my comment without adding to the discussion.
This is worse than singletons that - in all their glorious capacity to create tight coupling between unrelated parts of your application - are at least guaranteed to keep their identity after having been constructed and can thus provide some sort of sane exit path by keeping track of changes made to their state and informing observers.
- xkriva11 3y agoThe ability to change the identity of objects is not really used in normal code, so it is pointless to complain about it as bad practice. But it may be handy during debugging sessions, and it is an essential feature that allows the system to evolve like a living system. It is used during class migration and so on. (It wasn't me who downvoted your comment)
- igouy 3y agoPerhaps the comment seemed to condemn without showing knowledge or understanding. Perhaps asking why someone might need to do that would have prompted a more informative response.