4 ms·
To me as well, good readability means not having to read too much. Here is a code example from the front page of the official Python website [python.org]: >
by antfarm 6y ago
To me as well, good readability means not having to read too much.
Here is a code example from the front page of the official Python website [python.org]:
>>> numbers = [2, 4, 6, 8]
>>> product = 1
>>> for number in numbers:
... product = product * number
Compared to the Ruby equivalent,
product = [2, 4, 6, 8].inject(:*)
this feels like unnecessary bloat that makes it harder to understand what is going on in the larger picture, i.e. the unit of code this is a part of.