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

Which defines it this way, because various original Unix components (including things like stdio) will break in various surprising and inconsistent ways when text file does not end in \n or contains lines longer than some arbitrary limit (which is why POSIX has LINE_MAX).


It's very much in favour of consistency as well as simplicity and therefore predictability that newlines should be terminators.

What would you have `cat file1 file2` do? Add newlines in between the files? It simply concatenates. It shouldn't even differentiate on the content. It's just arbitrary binary data to it. I can even use it on mp3s to join them. Why should it be limited to text files with newline separators? Add an option to add newlines in between the files? Why complicate matters? Simplicity is king! Let's do more with less software.




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

Search: