Doubled newlines
Jonathan M Davis
jmdavisprog at gmail.com
Sat Jul 31 20:38:24 PDT 2010
On Saturday 31 July 2010 20:10:05 Andrej Mitrovic wrote:
> Oh and I'm getting the same issue in Python when using CR only. I don't
> know why I have the CR option in the text editor if it doesn't work
> properly. I guess CR is used on the Macs maybe..?
Prior to Macs becoming Unix based, they used '\r' for the end-of-line character.
Once they became Unix based, they did what Unix does and used '\n'. So, at this
point, you really only have to worry about '\n' vs '\r\n' with Windows being the
only odd man out.
The funny thing is that _technically_ speaking, Windows is right: a newline
drops down a line, and carriage return goes to the beginning of a line, so both
are necessary. But since we don't use typewriters anymore or use consoles in
that way, combing them into one character like C did is better, and that's what
most everything does. So, while Wnidows is arguably more correct, it causes
problems and is arguably inferior.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list