Why does readln include the line terminator?
Georg Wrede
georg.wrede at iki.fi
Tue Apr 14 12:19:38 PDT 2009
BCS wrote:
> Reply to Georg,
>
>> So the whole point is absurd. A reasonable default behavior for a file
>> mongering program would be to output line terminators according to the
>> operating system default. The case where one *wants* to preserve them,
>> should be considered the exception.
>>
>
> Only if you considering wanting to maintain merge-ability/diff-ability
> as the exception. Some, if not most, source control/diff/merge tools
> consider changes in line endings as changes.
Doesn't this kind of prove my point? Changing a line ending /should not/
be a "difference". Not by default. They should have a switch to
explicitly turn it on.
A good diff is complex enough that it should not stumble on form when it
is supposed to examine content.
More information about the Digitalmars-d
mailing list