KeepTerminator
Marco Leise via Digitalmars-d
digitalmars-d at puremagic.com
Tue Oct 20 01:45:25 PDT 2015
Am Tue, 20 Oct 2015 13:08:07 +0530
schrieb Shriramana Sharma <samjnaa_dont_spam_me at gmail.com>:
> Writing stdin.byLine(KeepTerminator.yes) is quite awkward. Why this long
> name and not something shorter like KeepEOL?
Because enums work that way in D: <enum name>.<member name>
and probably because someone found that we had too many too
short names in Phobos already.
> BTW on Python the default is to *not* strip the newlines. Is there a reason
> the opposite is true here?
I assume, that's because typically you are not interested in
the control characters between the lines. They mostly just get
in the way and the last line may or may not have a line-break.
--
Marco
More information about the Digitalmars-d
mailing list