Naming convention for params of ctors and setters

前端 未结 12 1823
轻奢々
轻奢々 2021-01-05 00:42

For those of you who name you member variables with no special notation like m_foo or foo_, how do you name parameters to your ctors and setters?

12条回答
  •  心在旅途
    2021-01-05 01:20

    I always go for a Param or Arg suffix but only when disambiguation is necessary.

    Obj(int fooArg) : foo(fooArg)
    

提交回复
热议问题