How Bad Are Singletons?

后端 未结 7 2066
傲寒
傲寒 2021-01-02 22:41

So ....

There are obviously many questions that all have been asked about Singletons, Global State Variables, and all that great stuff. My question is,

7条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-02 23:17

    Because it's relatively easy to work with singletons, and working without takes much more detailed planning of your application's structure. I asked a question about alternatives some time ago, and got interesting answers.

提交回复
热议问题