On Thursday, 17 July 2014 at 22:27:52 UTC, Dicebot wrote:
On Thursday, 17 July 2014 at 22:21:54 UTC, Brad Anderson wrote:
Well the idea is that you then copy into an output range with
whatever allocation strategy you want at the end. There is
quite a bit of overlap I think. Not complete overlap and
OutputRange accepting functions will still be needed but I
think we should prefer the lazy approach where possible.
It is not always possible - sometimes resulting range element
must be already "cooked" object. I do agree it is a powerful
default when feasible though. At the same time simple output
range overloads is much faster to add.
From what I'm getting is that we might have the chance here to
redefine memory usage, as was pointed out by Teoh et al. Reduce
allocations as much as possible, avoiding a problem in the first
place is better than solving it. It's worth thinking in this
direction, cos the GC / RC issue will always boil down to the
fact that there is a price to be paid.