http://qs321.pair.com?node_id=68703


in reply to A Little History on 0D0A
in thread Cross platform file I/O code

Good post.

Probably important note printers were the dominant output device through much of the 50's and 60's, and well into the 70's. The CR/LF was necessary for use with early computers, and was well entrenched before monitors became mainstream.

Because printers didn't allow you to backup and erase, you wrote code with a line editor. When you wanted a change, you had to figure out what line numbers to edit, print them out, and type in your revisions. This all could get pretty tedious, so various shortcuts were devised to search for patterns in a file, to replace one string with another, etc. In time, these shortcuts grew into regular expressions, which as we all know, have proven useful long after the line editor has become a thing of the past.

So, the same mechanism that gives us end of line headaches, gave rise to a cornerstone of the greatest programming language ever. I think we came out ahead on this one. :)