Why does readln include the line terminator?

Georg Wrede georg.wrede at iki.fi
Mon Apr 13 20:12:57 PDT 2009


Readln returns a string which contains the line terminator.

Is there a grand reason for this?


Currently there are a few drawbacks with this. The naive user doesn't 
expect it, and the seasoned user has to keep stripping it. And then he 
has to search the docs (or get hold of other OSs) to determine what 
terminator to expect on other systems.

And it can't really be a speed optimization either, because to do 
anything useful with a string, you have to strip the terminator anyway 
at some point.



More information about the Digitalmars-d mailing list