Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's because there's some unix commandline tools that won't work right when a file does not end with a newline.


For serious. For just one example, `cat` doesn't act as expected without a trailing newline. You end up with stuff like <(echo) to space things out and it's really bogus.


Actually the ISO C99 language standard requires that every source file ends with a newline (§5.1.1.2, 2.):

"A source file that is not empty shall end in a new-line character [...]"

So if your C implementation doesn't complain about source files that don't end with a newline, you're unknowingly relying on a language extension.


lol. You'd think if "it's open source you can fix it yourself" worked as an ideology, its heartland would be Unix commandline text processing tools.


> "If it's open source you can fix it yourself, given that it is not standardised somehow, and that you have time to spare, and that you have the skills and knowhow to do it or that you possess the financial resources to hire some developers to do it for you.

FTFY.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: