When is a function name too long?

后端 未结 27 1558
伪装坚强ぢ
伪装坚强ぢ 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条回答
  •  -上瘾入骨i
    2021-02-03 19:06

    IMO, it's too long when it has a conjunction in it. "When", "And", "Then", ... anything like that. Following the One Responsibility Rule should allow function names that are long enough to be descriptive and short enough not to be ridiculously annoying.

提交回复
热议问题