Naming Convention
定义 Definition
“naming convention” 指命名规范/命名约定:在写作、编程、数据管理等场景中,为变量、函数、文件、类名、标题等制定的一套一致的命名规则,以提高可读性、可维护性与协作效率。(也可写作 naming-convention,含义不变。)
发音 Pronunciation (IPA)
/ˈneɪmɪŋ kənˈvɛnʃən/
例句 Examples
Use the same naming convention for all files.
对所有文件使用同一种命名规范。
A clear naming convention reduces confusion, especially when many people contribute to the same codebase.
清晰的命名规范能减少混乱,尤其是在多人共同维护同一套代码库时。
词源 Etymology
naming 来自 name(给……命名);convention 表示“惯例、约定”,源自拉丁语 convenire(聚到一起、达成一致)。合起来就是“大家约定好如何命名”的规则体系。
相关词 Related Words
文献与作品 Literary / Notable Works
- Clean Code(Robert C. Martin)——多处强调用一致、可读的命名来提升代码质量
- The Pragmatic Programmer(Andrew Hunt, David Thomas)——谈到团队协作与可维护性时涉及命名约定
- Code Complete(Steve McConnell)——在编码风格与可读性章节中讨论命名规则的重要性
- PEP 8 – Style Guide for Python Code ——作为权威风格指南,明确规定多种命名约定(函数、类、常量等)
- Google Style Guides(如 Google Java Style Guide)——系统规定工程实践中的命名规范与一致性要求