Managing highly repetitive code and documentation in Java

后端 未结 9 659
南旧
南旧 2020-11-30 22:53

Highly repetitive code is generally a bad thing, and there are design patterns that can help minimize this. However, sometimes it\'s simply inevitable due to the constraints

9条回答
  •  时光取名叫无心
    2020-11-30 23:26

    From Wikipedia Don't Repeat Yourself (DRY) or Duplication is Evil (DIE)

    In some contexts, the effort required to enforce the DRY philosophy may be greater than the effort to maintain separate copies of the data. In some other contexts, duplicated information is immutable or kept under a control tight enough to make DRY not required.

    There is probably no answer or technique to prevent problems like that.

提交回复
热议问题