Parameter vs. Member variables

前端 未结 9 932
别跟我提以往
别跟我提以往 2021-01-01 11:15

I\'ve recently been working with someone else\'s code and I realized that this individual has a very different philosophy regarding private variables and method parameters t

9条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-01 12:01

    Class members should be any of the following:

    • A dependency of a class
    • A variable that represents the state of the class
    • A method of the class

提交回复
热议问题