Files
nexus/wiki/concepts/DRY-原则.md
2026-04-17 08:38:12 +08:00

23 lines
531 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: "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
- [[单一职责]]
- [[模块化]]
- [[代码可读性]]