[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] Why are consecutive blank lines prohibited?
From: |
Vadim Zeitlin |
Subject: |
[lmi] Why are consecutive blank lines prohibited? |
Date: |
Sat, 20 Dec 2014 01:27:59 +0100 |
Hello,
I've refrained from asking about this for a long time because it's not
really that important in the grand scheme of things, of course, but after
having just removed a few more blank lines I had reflexively added to help
readability of a long test because "make check_concinnity" flagged them as
an error, I simply can't resist the urge to ask any more.
So: what is the rationale for forbidding the use of consecutive blank
lines in the sources (see the last but one check in assay_whitespace() in
test_coding_rules.cpp)?
IMO judicious use of blank lines inside the function body helps with
making the logical code structure more clear, i.e. I typically insert a
single blank line between any non intimately related statements and insert
two of them between higher level blocks of code. If blank lines correspond
to white space in horizontal direction, then consecutive double blank lines
correspond to paragraph breaks.
Is there any real harm in doing this? Does this rule have some deeper
purpose, e.g. encouraging breaking longer functions in several parts (which
is a good idea in general but maybe slightly less great for testing code
where it may be desirable to keep the structure very simple and just put
one test after another)?
I will submit the next patch(es) without any consecutive blank lines, of
course, but it would be interesting to know why do the current coding
standards forbid their use and, maybe more constructively, what should be
used instead.
Thanks in advance,
VZ
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi] Why are consecutive blank lines prohibited?,
Vadim Zeitlin <=