O'Reilly logo
  • LI WEI thinks this is interesting:

When objects are coded this way, it makes the object much easier to work with, that is, easier to read and maintain

From

Cover of Learning C++ by Creating Games with UE4

Note

这样让对象自己维持自己的变量状态。其他对象访问函数不会遇到当前这个变量是否为私有等问题