3 ms·
I do use whitespace (empty lines) to "group" parts of a function the way paragraphs group thoughts in prose. For a function it might be as simple as param-check
by JKCalhoun 3y ago
I do use whitespace (empty lines) to "group" parts of a function the way paragraphs group thoughts in prose. For a function it might be as simple as param-check, setup, loop, tear-down. But it makes it a little clearer that some lines of tightly-grouped code represent an "activity" (sub-activity?).
- Izkata 3y agoAs an example, your own comment three above is split into three parts (quote and two sections of your own). Plus my comment here, split into two. Code has its own flow and natural groupings just like human language, and adding spacing to match makes it easier to understand even though it is subtle.