User Tools

Site Tools


principles:don_t_repeat_yourself

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
principles:don_t_repeat_yourself [2020-10-12 14:01] – old revision restored (2013-08-10 10:56) 159.69.186.191principles:don_t_repeat_yourself [2021-10-18 21:27] (current) – +++ restored +++ christian
Line 28: Line 28:
  
   * Add a new invokable module (a function, a method, a class, etc.) instead of duplicating code   * Add a new invokable module (a function, a method, a class, etc.) instead of duplicating code
 +  * Factor out a common base class
   * Use code generation when information has to be represented in multiple forms   * Use code generation when information has to be represented in multiple forms
   * Use polymorphism to avoid repeatedly enumerating a set of possible solutions in if or switch statements   * Use polymorphism to avoid repeatedly enumerating a set of possible solutions in if or switch statements
Line 93: Line 94:
  
 Discuss this wiki article and the principle on the corresponding [[talk:principles:Don't Repeat Yourself|talk page]]. Discuss this wiki article and the principle on the corresponding [[talk:principles:Don't Repeat Yourself|talk page]].
 +
principles/don_t_repeat_yourself.1602504093.txt.gz · Last modified: 2020-10-12 14:01 by 159.69.186.191