2 ms·
Related to PRY, see "rule of three" - which I think is a reasonable position between DRY and PRY. https://en.wikipedia.org/wiki/Rule_of_three_(computer_program
by srid 2y ago
Related to PRY, see "rule of three" - which I think is a reasonable position between DRY and PRY.
https://en.wikipedia.org/wiki/Rule_of_three_(computer_programming) https://en.wikipedia.org/wiki/Rule_of_three_(computer_progra...
Rule of three ("Three strikes and you refactor") is a code refactoring rule of thumb to decide when similar pieces of code should be refactored to avoid duplication. It states that two instances of similar code do not require refactoring, but when similar code is used three times, it should be extracted into a new procedure.