When is a function name too long?

后端 未结 27 1623
伪装坚强ぢ
伪装坚强ぢ 2021-02-03 18:45

I try to be rather descriptive with my function names, where possible. This occasionally results in function names in the twenty to thirty character range such as \"GetActionFr

27条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-03 18:52

    In my opinion a function name should be exactly as long as needed to describe what its purpose is. If you think that the name of the function is too long, then that may be an indication of that it tries to do too many things, and should be refactored.

提交回复
热议问题