Being Concise
Writing concise code is a two-edged sword
- extremely concise tends towards cryptic/unreadable
- extremely verbose tends towards tedious to read
There is clearly a middle ground.
Many languages have concise idioms for useful operations, e.g.
-
while ((c = getchar() != EOF) putchar(c);
-
print <>;
-
for (p = L; p != NULL; p = p->next) ...
-
foreach ($students as $s) ...
Use such idioms where available.
|