4 ms·
Writing and reading repetitive code leads to unintentional defects. This is why for loop syntax that directly iterates through a collection is less error prone
by z0r 3y ago
Writing and reading repetitive code leads to unintentional defects. This is why for loop syntax that directly iterates through a collection is less error prone than the equivalent loop built on indexed look-ups. "Clever" code, at least when it is shorter, is often clearer than "simple" code.
- Veraticus 3y agoI entirely disagree; defects are created by complexity, not repetition.
- soulbadguy 3y ago> defects are created by complexity, not repetition. Any reference for this ? I though there was a pretty strong connection between the total number of line of code and the number of bug... That's the whole point of DRY.