[phobos] The time has come to destroy all y'all over CR/LF
spir
denis.spir at gmail.com
Wed Jan 26 17:13:57 PST 2011
On 01/26/2011 10:53 PM, Walter Bright wrote:
>
>
> 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
Indeed it's trivial (convert on input every line ending to a unique form that
could be at best unicode <LINE SEPARATOR> not to be accused of bias ;-), then
convert back to the current Os's form on output). Tons of PLs do that
transparently. I also cannot understand why any tool in the XXIth century does
not provide this feature (without even mentioning it, so trivial an issue it
is). Even less /programmer/ tools like git! Where's the point?
Denis
--
_________________
vita es estrany
spir.wikidot.com
More information about the phobos
mailing list