Some code style tools recommend this and I remember seeing some unix command line tools warning about missing empty line.
What is the reasoning for having an extra empty line?
Some code style tools recommend this and I remember seeing some unix command line tools warning about missing empty line.
What is the reasoning for having an extra empty line?
Apart from the fact that it is a nicer cursor position when you move to the end of a file in a text editor.
Having a newline at the end of the file provides a simple check that the file has not been truncated.
It's because of the definition of what a text file is. When you create a new text file in any unix environment, the contents of that file is the new line character '\n'
Without this, the file isn't really identified as a text file. Now once we add code to this text file, its about not removing this initial new line that defines a text file itself.