std.range's put on arrays needs to change
Paul Backus
snarwin at gmail.com
Sun Jun 26 12:35:10 UTC 2022
On Sunday, 26 June 2022 at 05:10:50 UTC, H. S. Teoh wrote:
> On Sun, Jun 26, 2022 at 04:21:46AM +0000, Paul Backus via
> Digitalmars-d wrote:
>> IMO `put` should be changed in `std.v2` to either throw an
>> exception or return `false` when attempting to insert an
>> element into a full output range.
>
> Why the needlessly complex workaround? Just introduce a .full
> method, the natural analogue of .empty for output ranges.
How would you implement .full for, say, an output range that
writes to a file?
More information about the Digitalmars-d
mailing list