Why is it recommended to have empty line in the end of a source file?

后端 未结 8 901
独厮守ぢ
独厮守ぢ 2020-12-02 04:44

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 e

8条回答
  •  没有蜡笔的小新
    2020-12-02 05:39

    Some languages define their input file in terms of input lines, where each input line is a series of characters terminated by a carriage return. If their grammar is so defined, then the last valid line of the file must be terminated by a carriage return too.

提交回复
热议问题