On Thursday, 4 April 2024 at 21:23:00 UTC, user1234 wrote:
On Thursday, 4 April 2024 at 19:56:50 UTC, Ferhat Kurtulmuş
wrote:
[...]
```d
module runnable;
import std.stdio : writeln;
import std.range : chain;
void main() @nogc
{
auto s = chain("as ", "df ", "j"); // s is lazy
writeln(s);
}
```
Bad example. The range is indeed a `@nogc` lazy input range but
`writeln` is not a `@nogc` consumer.
[...]
The input range consumer has to be @nogc as well.
I don't understand your point sorry. I didn't imply anything
about @nogc. I of course know writeln is not nogc. I just kept
the example simple.