Thought Provoking Carriage Returns

Teach Yourself C

Thought Provoking Carriage Returns

As I was going through chapter 4 of 'Teach Yourself C', I noticed that in one of the examples there was a backslash-character constrant; `/r` that I hadn't ever seen in Ruby. I looked up the name of this symbol and found that it is called a 'carriage return', an interesting name to be found in a programming language.

I looked up the name ‘carriage return’, to see if my suspicions as to the origins of the name were true. And they were! Carriage return comes from the age of typewriters, where the carriage return was the lever which would cause the assembly holding the paper to return to the right side of the machine in order to type a new line again on the left-side of the paper. The carriage itself was the device that held the paper, and the return the mechanism to bring the paper back to its original starting point.

This made me wonder, if a programming language used the term carriage return, typewriters were either in common use during the creation of programming languages….or….of course. While following my train of thought I nearly facepalmed. As one of the first generations to be a native to the age of the internet, computers, and laptops, I had completely forgotten that in the not-so-distant past, laptops would have been not only common, but the only way to ‘type up’ anything!

Ok, I thought, using a typewriter to write code can’t be that bad…but that wasn’t the case either. Why would a typewriter be used to write code when it needs to go into the machine itself to be processed? Nope, all the original code for the first computers was hand written with pen and paper and then manually inputted into the computer itself. I can’t imagine the joy expressed on people’s faces when the first assembler finally came out.

Dialogue & Discussion