Auto-sync: 2026-04-17 08:37

This commit is contained in:
2026-04-17 08:38:12 +08:00
parent 6caa1c2f47
commit a0a48bd334
247 changed files with 6577 additions and 3061 deletions

View File

@@ -0,0 +1,22 @@
---
title: "DRY 原则"
type: concept
tags: []
---
## Definition
DRYDon't Repeat Yourself原则意为"不要重复自己"。它是软件工程的核心原则之一,旨在减少代码中的重复。
## Key Points
- 避免重复代码,提炼公共逻辑
- 单一信息源Single Source of Truth
- 模块化、函数化,提高复用价值
- 便于维护和修改
## Source
- [[kai-fa-jing-yan-yu-xiang-mu-gui-fan-zheng-li-wen-dang]]
## Related Concepts
- [[单一职责]]
- [[模块化]]
- [[代码可读性]]