[phobos] The time has come to destroy all y'all over CR/LF

Walter Bright walter at digitalmars.com
Wed Jan 26 14:00:29 PST 2011



Andrei Alexandrescu wrote:
> On 1/26/11 1:18 PM, Walter Bright wrote:
>>
>>
>> Andrei Alexandrescu wrote:
>>>
>>> So CR alone should be available as "go to the beginning of the current
>>> line". LF alone should mean "go to the beginning of the next line".
>>> And that should be it. Unix got this right. CP/M et al got this wrong.
>>>
>>
>> CP/M did not invent that meaning for LF. LF goes back decades earlier
>> than CP/M.
>
> I mentioned CP/M because it's the first OS that inherited the sequence 
> without actually being backed up by a paper-based TTY, where a very 
> weak argument could be constructed that CR/LF is how the mechanics of 
> the system works.

Are you sure that ASR-33's, DECwriters, Daisy wheels, and glass 
terminals were not used with CP/M? They were!

>
>> In the early 80's, unix wasn't seen much. The best systems were the DEC
>> computers, and a lot of software professionals expected DEC to become
>> the dominant player. DEC operating systems were widely seen as the best.
>> (IBM was still mired in their ridiculous EBCDIC encoding.)
>>
>> I suspect that unix and its conventions would be dead by now if not for
>> Linux.
>
> Be that as it may, in Unix '\n' means "go to the beginning of next 
> line" and '\r' means "go to the beginning of the current line". I 
> argued destructively that this is the way things should have been EVEN 
> on paper-based terminals and NO DISCUSSION the way things should be on 
> today's terminal emulators.
>
> Unix got this right. CP/M et al got this wrong.
>

I agree that the Unix way is better. But it is not *wrong* to be 
compatible with the enormous inertia of existing practice.

(CP/M worked like RT-11, and RSTS-11, which were enormously successful 
minicomputer systems. I have always been amused by the charges that 
Microsoft "stole" ideas from CP/M with no mention that CP/M was a copy 
of DEC's systems.)


More information about the phobos mailing list