Tricky semantics of ranges & potentially numerous Phobos bugs
Jonathan M Davis
jmdavisProg at gmx.com
Mon Oct 15 22:59:26 PDT 2012
On Monday, October 15, 2012 22:48:15 Jonathan M Davis wrote:
> So, I don't really know what the right answer is, but I _really_ don't like
> the idea of having to worry about the result of front changing after a call
> to popFront in every single function that ever uses front. In the general
> case, I just don't see how that's tenable. I'd _much_ rather that it be up
> to the programmer using abnormal ranges such as ByLine to use them
> correctly.
And actually, it seems to me that issues like this make it look like it was a
mistake to make ranges like ByLine ranges in the first place. They should have
just defined opApply so that they'd work nicely in foreach but not with range-
based functions. They're clearly not going to work with a _lot_ of range-based
functions.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list