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

It's pretty unfortunate that we ended up with system dependent newlines. This means that text files are not byte-for-byte the same across systems so comparisons or hashing need normalization. This also makes reliable line splitting less convenient. I was also bitten by FTP transferring binary files with text mode instead of binary mode, causing corruption.

Nowadays I tend to enforce LF everwhere. Windows can deal with it, and it ensures consistent cross platform handling. I know that Rust also uses a single LF on all platforms, not sure if there are other such languages.



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

Search: