Hi all. Who know, what profit i have if i add new ...
# android
n
Hi all. Who know, what profit i have if i add new line in the end file ? I see this setting but I don’t know if I need it ?
😶 4
I have heard that this somehow helps the compiler, is it so?
z
Have you already tried to Google this? First result for me perfectly explained it
n
Yes, I have. But i don’t search some interesting
Can you give link ?
z
What did you type into Google?
n
“kotlin add new line in the end file”
z
Well this issue isn't Kotlin related. Maybe remove that and try search again
n
Is it really so difficult to give a link ? Or is it like coaching ?
😄 1
z
Is it really difficult to perform a basic Google search?
💯 1
🥶 1
z
The only advantage I know of is slightly cleaner diffs when adding more lines at the end of a file, since the previous last line doesn't get included in the diff due to the new newline character on it. Kind of the same argument as trailing commas.
l
Bit late to the party but it's part of the posix-standard: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 . If the last human visible line in a text file does not end with a newline it is technically not a line by posix-standard. Most editors and tools will handle this just fine but a few tools might behave surprisingly.
today i learned 1