Why is there no lazy `format`?
burt
invalid_email_address at cab.abc
Tue Oct 20 15:57:25 UTC 2020
On Tuesday, 20 October 2020 at 13:45:20 UTC, rikki cattermole
wrote:
> You are describing the purpose of an output range.
>
> I.e.
>
> [...]
I see. However, this still feels wrong; after all, we also do not
use an output range for algorithms like map:
```
OutputRange output;
[1, 2, 3].map!((x) => x + 1)(output);
```
Mostly because it does not allow chaining like `lazyFormat("%d
plus %d is %d", 1, 2, 3).joiner().map!toUpper()`.
It still feels incosistent to me. An input range could achieve
the same goals, but it would be much more flexible and pleasing
to use.
More information about the Digitalmars-d
mailing list