Files
nexus/wiki/concepts/变量命名规范.md
2026-04-14 16:02:50 +08:00

24 lines
643 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "变量命名规范"
type: concept
tags: [编码, 规范]
sources: [dev-experience-standards]
last_updated: 2026-04-14
---
## Definition
软件开发中的变量命名标准,确保代码可读性和可维护性。
## 规范
- 格式:小写英文+下划线 或 小驼峰
- 原则:命名体现内容职责,避免缩写
- 常量:大写+下划线(如 `MAX_RETRY_COUNT`
- 禁止:无意义名称如 `a, b, c`
## 变量名大全文件
建立统一索引文件,包含:
| 变量名 | 变量注释 | 出现位置 | 出现频率 |
## Connections
- [[开发经验与规范]] ← 组成部分 ← [[变量命名规范]]