std.v2020.algorithm etc[ WAS: Is run.d going to be expand for runtime and the phobos library?]
Jon Degenhardt
jond at noreply.com
Sat Jun 20 19:23:55 UTC 2020
On Saturday, 20 June 2020 at 18:26:43 UTC, Steven Schveighoffer
wrote:
> But the larger point is that true input-only ranges are rare.
> The only problem is for classes, since you cannot invoke a copy
> constructor on those.
Interesting discussion. Could you expand on this comment? Several
people have mentioned this.
I write my own input ranges somewhat regularly. I've never had
the need to make them forward ranges. However, the typical reason
for creating a range is because I have application specific data
that I want to iterate over (and usually construct) lazily. Input
ranges are very convenient way to do this. I do end up making
many of them reference ranges though.
So, I'm wondering if its really that input-only ranges are rare,
or if it's that the number of algorithms that can be used on
input-only ranges is small. Or perhaps I'm not quite grokking the
distinction between a "true" input-only range and one that
satisfies isInputRange, but none of the other range primitive
tests.
--Jon
More information about the Digitalmars-d
mailing list