Are singletons pathalogical liars?

Miško Hevery thinks so: Singletons are Pathological Liars

It actually discusses how Singletons allow APIs to be the liars (they depend on objects that aren’t explicitly advertised as dependencies).

I agree with Martin Probst’s response, but I’m actually more interested in this question by okoman.

The response is apparently answered in the post Dependency Injection Myth: Reference Passing

What do you think?


Leave a Reply

Your email address will not be published / Required fields are marked *