let's talk about output ranges

Dmitry Olshansky dmitry.olsh at gmail.com
Thu Feb 6 11:29:40 PST 2014


06-Feb-2014 20:21, Adam D. Ruppe пишет:
> splitting from the ARC thread
>
> On Thursday, 6 February 2014 at 15:47:48 UTC, Johannes Pfau wrote:
>> As they do not keep references there's no need for ARC or GC,
>> we just need a way to tell every function how it should allocate.
>
> yea. I think it is time we hashed out output ranges the same way we've
> done with input ranges. Right now, output ranges just have put(T). I
> think it would be useful to add extensions similarly to random access
> ranges, infinite ranges, etc..
>

Just throwing a bit of related thoughts that came and go up w.r.t. 
output ranges.

We really should add multiplexer (one sink writes to many) and 
demultiplexer adapters (by applying n-ary predicate and putting the 
result into a single sink).

And a 3rd filter primitive, as a wrapper of a sink that applies some 
predicate before forwarding it down the line.

Together with other suggestions would make output ranges *much* more 
powerful/useful.

-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list