错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Naming Things

  • Carleton DiLeo

摘要

Coming up with names for variables, classes, and methods in a program is not an easy task. We must be gurus to think of a name at a moment’s notice. It’s part of our everyday coding lives, and we can’t let down our guard. Choosing the wrong name has significant implications and can determine whether code is easy to read or confusing and cryptic. It doesn’t end there, because poor-quality names have a compounding effect: one bad name encourages more bad names, and those bad names promote even more bad names. Progress crawls to a halt because these bad names make our code impossible to understand.