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

>Newlines at the end of a string are certainly something that could get lost in transit inside an online service involving multiple runtimes.

In what way could newlines at the end of a string "could get lost in transit"?



If you write it to a text file by itself and then read it from that text file, each runtime can have a different definition of whether a newline at the end of the file is meaningful or not. Under POSIX, a newline should always be present at the end of a non-empty text file and is not meaningful; not everyone agrees or is aware.

There are plenty of other ways, too; bugs happen.


Ideally no runtime should alter strings passing through ("in transit") from one runtime to another - unless it does some processing on them.




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

Search: