首页 > 其他 > 详细

编码原则 之 Once and Only Once

时间:2019-04-26 13:11:22      阅读:164      评论:0      收藏:0      [点我收藏+]

The Once and Only Once principle can be thought of as a subset of the Don’t Repeat Yourself principle, and is one of the most fundamental principles of software development.

 

Duplication of behavior is one of the most common sources of bugs in software systems, since it becomes increasingly likely that changes to behavior defined in one location may not be propagated to all locations where this behavior is defined

 

Eliminating the duplication caused by not following the Once and Only Once principle is one of the primary reasons for refactoring and is also at the core of many design patterns.

编码原则 之 Once and Only Once

原文:https://www.cnblogs.com/panpanwelcome/p/10773698.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!