Parameter vs. Member variables

前端 未结 9 902
别跟我提以往
别跟我提以往 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:00

    In general, class members should represent state of the class object.

    They are not temporary locations for method parameters (that's what method parameters are for).

提交回复
热议问题