Tricky semantics of ranges & potentially numerous Phobos bugs

Marco Leise Marco.Leise at gmx.de
Thu Oct 18 19:16:55 PDT 2012


Am Wed, 17 Oct 2012 22:09:08 +0200
schrieb "monarch_dodra" <monarchdodra at gmail.com>:

> Given that "byLine" already exists, I'm not sure we can change it 
> now. But I wouldn't be against adding a "byLineSlow" or something.
> 
> However, if we could start again, I'd *definitely* favor a deep 
> copying "byLine" by default, and have a faster, but harder to use 
> "byLineFast".

I agree. And simple demo programs can just use

byLine => string

and if we talk about a fast "word count" demo, then it
probably doesn't hurt when the reader sees, that the library
provides ranges for both use cases.

byLineOverwrite => char[]

After all a line is expected to be a string, and D to be safe.
But the real issue are the differing views on how .front
should work. Unlike other problems, this one has solutions
that wont break code, if that is a requirement. So I'll let
the Phobos crew argue and see what happens. :)

-- 
Marco



More information about the Digitalmars-d mailing list