Are static methods good for scalability?

后端 未结 8 623
故里飘歌
故里飘歌 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:32

    Voted down. The OP clearly doesn't quite understand OO. An instance method doesn't take up any extra space when an instance object is created. Static methods aren't going to save you anything unless you're also avoiding creating any instances, in which case you're going so far afield from what an OO language was built for that it's sort of pointless discussion.

提交回复
热议问题