3 ms·
The only difference I can think of is when appending to a file. Starting with an empty file you’re on a new line. But if you don’t end every line with a newli
by eska 4y ago
The only difference I can think of is when appending to a file.
Starting with an empty file you’re on a new line.
But if you don’t end every line with a newline character then your next line will end up on the same line in the file as the last one.
- squeaky-clean 4y agoOnly reason I do it is because if you're adding onto a file, git will say the (prior) last line is modified because you have added the newline to it. But it's not a really big deal, I don't enforce it with any linter/CI. It's just 0.01% annoying to see a 20 line commit say 21 lines changed.