Re: [PATCH 2/8] xdl_change_compact(): clarify code
From: Stefan Beller <hidden>
Date: 2016-08-10 21:20:16
On Wed, Aug 10, 2016 at 9:39 AM, Michael Haggerty [off-list ref] wrote:
I realized that the main thing that took me a while to grok when I was reading this code was that blank_lines was really only used as a boolean value, even though it was updated with "+=". That's the main information that I'd like to convey to the reader.
Oh :( I think there was some discussion when we added the blank line counting whether we would want to have it boolean or counting. And we settled for counting as "future algorithms can make use of this additional information" IIRC.
So I decided to change the comment to emphasize this fact (and change it from a question to a statement), and also changed the place that blank_lines is updated to treat it more like a boolean. The latter change also has the advantage of not calling is_blank_line() unnecessarily when blank_lines is already true. If you have no objections, that is what I will put in v2 of this patch series:
No objections from my side, sorry for this lengthy discussion about a comment, Thanks, Stefan