Full Stack Engineer with a history of working in the computer software industry following global best practices in building scalable technology solutions. A graduate of Maths/Statistics.
@cem
singletons are not completely bad , they have their use cases. However in most cases you need more than one instance of a class. Also in implementing a singleton class, the single class carries out all the different functions, even those unrelated defiling the SRP in solid.These and many more reasons to consider before choosing to use a singleton.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
@cem singletons are not completely bad , they have their use cases. However in most cases you need more than one instance of a class. Also in implementing a singleton class, the single class carries out all the different functions, even those unrelated defiling the SRP in solid.These and many more reasons to consider before choosing to use a singleton.