aboutsummaryrefslogtreecommitdiff
path: root/posts/don't_repeat_yourself.md
diff options
context:
space:
mode:
Diffstat (limited to 'posts/don't_repeat_yourself.md')
-rw-r--r--posts/don't_repeat_yourself.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/posts/don't_repeat_yourself.md b/posts/don't_repeat_yourself.md
new file mode 100644
index 0000000..d39267e
--- /dev/null
+++ b/posts/don't_repeat_yourself.md
@@ -0,0 +1,9 @@
1Looping constructs are bad. Consider this:
2
3```
4for (int i = 0; i < arr.len(); i++) { ... }
5```
6
7It is not obvious at all, what this loop does. Is it
8supposed to iterate over the elements of the array? Is it
9just a variable binding that increases up to `arr.len()`?