Are static methods good for scalability?

后端 未结 8 539
故里飘歌
故里飘歌 2021-02-04 19:03

Does static methods and class are good for scalability ? I think so static class/method improves scalability of application and instance methods doesn\'t scales much. So is it g

8条回答
  •  迷失自我
    2021-02-04 19:31

    Does static methods and class are good for scalability?

    One has little to do with the other.

    I think so static class/method improves scalability of application and instance methods doesn't scales much.

    Wrong. Why do you think so?

    So is it good programming practice to write static method where ever it is possible?

    No. In fact, it is very bad practice because it abandons the maintainability advantages of object-oriented programming.

提交回复
热议问题