When is a function name too long?

后端 未结 27 1633
伪装坚强ぢ
伪装坚强ぢ 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:48

    I'd say when you find yourself finding abbreviations for their names when referring to them. I also find it too much when people start describing pre-/post-/parameter- conditions in the names or giving hints on the implementation. (like getVersionInformationFormTheDatabase() or doSomethingWithoutCheckingFooFirst())

提交回复
热议问题