[phobos] The time has come to destroy all y'all over CR/LF
Walter Bright
walter at digitalmars.com
Wed Jan 26 13:53:23 PST 2011
David Simcha wrote:
> Forgive my ignorance, but why is this such a big issue? Shouldn't any
> decent programmer tool (diff utility, editor, IDE, etc.) be able to
> interpret CR, LF and CR LF as effectively meaning the same thing and
> do what you mean? In the context of source code noone ever wants to
> go to the beginning of the current line. The only time it can become
> ambiguous is when a CR LF was actually produced by two different edits
> with different settings (and is therefore supposed to mean two
> newlines, not one) and even then it only mildly screws up the whitespace.
>
> Bottom line: I fail to see why different line endings should be such
> an issue in the first place, unless we're using some overly strict or
> Stone Age tool that favors absolute adherence to some specification
> over common sense. In such cases it's more the tool that's the
> problem, not the source file. I don't give a hoot which line ending
> anyone uses, because all my tools seem to "just work" regardless, and
> I have absolutely no clue what line ending my IDE is set up to use
> because I don't understand why it really matters in practice.
>
Good question. In all the software I've written, I've gone to some
effort to ensure that line endings of LF, CRLF, and CR are automatically
taken care of. I've been doing this for 30 years.
Why text processing programs on both sides of the fence *still* fail at
this is beyond comprehension:
1. Windows Notepad
2. meld
3. many diff programs
4. git
5. FreeBSD make
More information about the phobos
mailing list