Frameworks and libraries
Sebastiaan Koppe
mail at skoppe.eu
Sat Sep 16 17:25:09 UTC 2023
On Saturday, 16 September 2023 at 05:32:19 UTC, Vladimir
Panteleev wrote:
> On Friday, 15 September 2023 at 20:38:12 UTC, Atila Neves wrote:
>> std.string, I get, but algorithm and range are poster children
>> for `@nogc`. I'm not going to claim that *nothing* in those
>> packages allocates on the GC heap, but I'd be very surprised
>> if there were many functions that did.
>
> It's not possible to `map` a range and add a variable to every
> element.
>
> Functor predicates are the solution:
> https://github.com/CyberShadow/ae/blob/bb876371c963130dd94a0f44a9a5a2561ff053b4/utils/functor/algorithm.d#L23-L69
I came to the same conclusion.
More information about the Digitalmars-d
mailing list