GCs in the news

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 17 15:16:08 PDT 2014


On Thursday, 17 July 2014 at 22:06:01 UTC, Brad Anderson wrote:
> I agreed with this for awhile but following the conversation 
> here 
> <https://github.com/D-Programming-Language/phobos/pull/2149> 
> I'm more inclined to think we should be adding lazy versions of 
> functions where possible rather than versions with OutputRange 
> parameters. It's more flexible that way and can result in even 
> fewer allocations than even OutputRange parameters would have 
> (i.e. you can have chains of lazy operations and only allocate 
> on the final step, or not at all in some cases).
>
> Laziness isn't appropriate or possible everywhere but it's much 
> easier to go from lazy to eager than the other way around.
>
>> [...]

This is not comparable. Lazy input range based solutions do not 
make it possible to change allocation strategy, they simply defer 
the allocation point. Ideally both are needed.


More information about the Digitalmars-d mailing list