What about carriage returns between sections of code?

Jump to: navigation, search

When is it good to include blank lines? I usually include a blank line between functions, classes, etc. But is it also good style to include blank lines between, say, major code sections within a function? That leads to the question of what counts as a major section of code within a function; I find it to be a pretty arbitrary/subjective decision, and ultimately having a lot of blank lines just hinders the reader from seeing very much of the code without scrolling.

Tisane 14:52, 3 June 2010 (UTC)07:09, 5 December 2011

Pretty much as you say: they're good, but should be used sparingly; it's much easier to say "apply common sense" than to try and legislate for it.

Happymelon 16:52, 3 June 2010 (UTC)07:09, 5 December 2011
 
Personal tools

Variants
Actions
Navigation
Support
Download
Development
Communication
Toolbox