digitalmars.D - KeepTerminator
- Shriramana Sharma (6/6) Oct 20 2015 Writing stdin.byLine(KeepTerminator.yes) is quite awkward. Why this long...
-
Marco Leise
(10/14)
Oct 20 2015
Because enums work that way in D:
. - Andrei Alexandrescu (5/9) Oct 20 2015 I recall at the time I defined the function, everyone in this forum
- John Colvin (4/9) Oct 20 2015 Or if you really care about those keystrokes:
Writing stdin.byLine(KeepTerminator.yes) is quite awkward. Why this long name and not something shorter like KeepEOL? BTW on Python the default is to *not* strip the newlines. Is there a reason the opposite is true here? --
Oct 20 2015
Am Tue, 20 Oct 2015 13:08:07 +0530 schrieb Shriramana Sharma <samjnaa_dont_spam_me 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
Oct 20 2015
On 10/20/2015 03:38 AM, Shriramana Sharma wrote:Writing stdin.byLine(KeepTerminator.yes) is quite awkward. Why this long name and not something shorter like KeepEOL?It is what it is. Write it and move on.BTW on Python the default is to *not* strip the newlines. Is there a reason the opposite is true here?I recall at the time I defined the function, everyone in this forum wanted the other way around. Andrei
Oct 20 2015
On Tuesday, 20 October 2015 at 10:10:05 UTC, Andrei Alexandrescu wrote:On 10/20/2015 03:38 AM, Shriramana Sharma wrote:Or if you really care about those keystrokes: enum KeepEOL = KeepTerminator.yes;Writing stdin.byLine(KeepTerminator.yes) is quite awkward. Why this long name and not something shorter like KeepEOL?It is what it is. Write it and move on.
Oct 20 2015